diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-05-15 19:28:04 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-05-15 19:37:13 -0700 |
commit | b50f8e42ba3010f0141e6a482e0820f658e89b63 (patch) | |
tree | 80cef469731d5857499883d45fd3424730f0db7c /setjmp/longjmp.c | |
parent | f1342e0be8e222dbca077beca94b5937564e8c4b (diff) | |
download | glibc-b50f8e42ba3010f0141e6a482e0820f658e89b63.tar.gz glibc-b50f8e42ba3010f0141e6a482e0820f658e89b63.tar.xz glibc-b50f8e42ba3010f0141e6a482e0820f658e89b63.zip |
Check for valid stack frame in longjmp.
If longjmp restores the stack frame to an address which is beyond the stack frame at the time of the longjmp call it would install an uninitialized stack frame. If compiled with _FORTIFY_SOURCE defined, longjmp will now bail out in this situation.
Diffstat (limited to 'setjmp/longjmp.c')
-rw-r--r-- | setjmp/longjmp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/setjmp/longjmp.c b/setjmp/longjmp.c index 9b1bda1caa..8545b36627 100644 --- a/setjmp/longjmp.c +++ b/setjmp/longjmp.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991,92,94,95,97,98,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,97,98,2000,2002,2009 + Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -39,8 +40,10 @@ __libc_siglongjmp (sigjmp_buf env, int val) __longjmp (env[0].__jmpbuf, val ?: 1); } +#ifndef __libc_siglongjmp strong_alias (__libc_siglongjmp, __libc_longjmp) libc_hidden_def (__libc_longjmp) weak_alias (__libc_siglongjmp, _longjmp) weak_alias (__libc_siglongjmp, longjmp) weak_alias (__libc_siglongjmp, siglongjmp) +#endif |