aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2012-03-05 11:05:42 +0100
committerAndreas Jaeger <aj@suse.de>2012-03-05 11:05:42 +0100
commit6c6a98c983c44b440ae66d2aa8f32529a9dd7bfe (patch)
tree4e31b4752e88a04776c09d35ef68037a396f8b8b /sysdeps
parent21bb2d2e642a5376983868a51743cfa0d12df6b5 (diff)
downloadglibc-6c6a98c983c44b440ae66d2aa8f32529a9dd7bfe.zip
glibc-6c6a98c983c44b440ae66d2aa8f32529a9dd7bfe.tar.gz
glibc-6c6a98c983c44b440ae66d2aa8f32529a9dd7bfe.tar.bz2
2012-03-05 Tom de Vries <tom@codesourcery.com>
* sysdeps/generic/dl-osinfo.h (_dl_setup_stack_chk_guard): Ensure default stack guard is set in last bytes. * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard): Same.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/dl-osinfo.h4
-rw-r--r--sysdeps/unix/sysv/linux/dl-osinfo.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/generic/dl-osinfo.h b/sysdeps/generic/dl-osinfo.h
index 2eaab3b..548fc46 100644
--- a/sysdeps/generic/dl-osinfo.h
+++ b/sysdeps/generic/dl-osinfo.h
@@ -30,8 +30,8 @@ _dl_setup_stack_chk_guard (void *dl_random)
if (dl_random == NULL)
{
- ret.bytes[sizeof (ret) - 2] = 255;
- ret.bytes[sizeof (ret) - 3] = '\n';
+ ret.bytes[sizeof (ret) - 1] = 255;
+ ret.bytes[sizeof (ret) - 2] = '\n';
}
else
{
diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h
index 874660b..780b20a 100644
--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
+++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
@@ -84,8 +84,8 @@ _dl_setup_stack_chk_guard (void *dl_random)
return ret.num;
}
# endif
- ret.bytes[filllen - 2] = 255;
- ret.bytes[filllen - 3] = '\n';
+ ret.bytes[filllen] = 255;
+ ret.bytes[filllen - 1] = '\n';
}
else
#endif