summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2013-11-26 19:38:24 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2013-11-27 11:11:51 +0100
commite9c615c1742dc30f0917a148eb3cffcaf893d934 (patch)
tree33d032da6bd9543465e5a0f2fd5ec50351533aab
parent880fb96e76909893cc9574ffe685f2071c4ae562 (diff)
continuation: fix "fortify" crash
Since 0508f586, errno.h is included above #undef _FORTIFY_SOURCE. But it must be placed above system headers to take effect *** longjmp causes uninitialized stack frame ***: /home/jwhite/xfer/spice/bin/spicy terminated ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7ffff48dc2a7] /lib/x86_64-linux-gnu/libc.so.6(+0xef239)[0x7ffff48dc239] /lib/x86_64-linux-gnu/libc.so.6(__longjmp_chk+0x33)[0x7ffff48dc1a3] /home/jwhite/xfer/spice/lib/libspice-client-glib-2.0.so.8(+0x49761)[0x7ffff78f1761] /home/jwhite/xfer/spice/lib/libspice-client-glib-2.0.so.8(+0x499a4)[0x7ffff78f19a4] /home/jwhite/xfer/spice/lib/libspice-client-glib-2.0.so.8(+0x1bae7)[0x7ffff78c3ae7] /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x135)[0x7ffff505f355] /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a688)[0x7ffff505f688] /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run+0x72)[0x7ffff505fa82] /home/jwhite/xfer/spice/bin/spicy[0x4054aa] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x7ffff480bead] /home/jwhite/xfer/spice/bin/spicy[0x405679]
-rw-r--r--gtk/continuation.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/continuation.c b/gtk/continuation.c
index d1249d6..e33d05a 100644
--- a/gtk/continuation.c
+++ b/gtk/continuation.c
@@ -18,10 +18,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <config.h>
-#include <errno.h>
-#include <glib.h>
+/* keep this above system headers, but below config.h */
+#ifdef _FORTIFY_SOURCE
#undef _FORTIFY_SOURCE
+#endif
+
+#include <errno.h>
+#include <glib.h>
#include "continuation.h"