This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH][sh] Fix iov[] size in register_dump()
- From: takashi dot yoshii dot zj at renesas dot com
- To: libc-alpha at sourceware dot org
- Date: Tue, 25 May 2010 18:57:56 +0900
- Subject: [PATCH][sh] Fix iov[] size in register_dump()
The incorrect size of iov array in register_dump() is resulting stack corruption.
This should be 114 (= regs*2 + fpregs*2 + "\n"*2).
/yoshii
2010-05-24 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
* sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Fix iov[] size.
---
diff --git a/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h b/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
index e3c9c0e..8381f9a 100644
--- a/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
+++ b/sysdeps/unix/sysv/linux/sh/sh4/register-dump.h
@@ -58,7 +58,7 @@ register_dump (int fd, struct sigcontext *ctx)
{
char regs[22][8];
char fpregs[34][8];
- struct iovec iov[112];
+ struct iovec iov[114];
size_t nr = 0;
#define ADD_STRING(str) \