diff options
author | Roland McGrath <roland@redhat.com> | 2006-01-12 11:03:46 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2006-01-12 11:03:46 +0000 |
commit | 8e4a3e61ef9034308d273fd10cb2cf256c9f068d (patch) | |
tree | 889e2e19abd0a82f2929081881620c4368093769 /system.c | |
parent | 0662b590abf091ea1b6f9d5fd0f6c1ab9fece2ee (diff) | |
download | strace-8e4a3e61ef9034308d273fd10cb2cf256c9f068d.tar.gz strace-8e4a3e61ef9034308d273fd10cb2cf256c9f068d.tar.bz2 strace-8e4a3e61ef9034308d273fd10cb2cf256c9f068d.tar.xz |
2006-01-12 Roland McGrath <roland@redhat.com>
* system.c (sys_sysctl): Don't read off end of NAME when max_strlen
exceeds INFO.nlen.
From Timo Lindfors <timo.lindfors@iki.fi>.
Fixes Debian#339117.
Diffstat (limited to 'system.c')
-rw-r--r-- | system.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1921,7 +1921,9 @@ struct tcb *tcp; goto out; } out: - max_cnt = abbrev(tcp) ? max_strlen : info.nlen; + max_cnt = info.nlen; + if (abbrev(tcp) && max_cnt > max_strlen) + max_cnt = max_strlen; while (cnt < max_cnt) tprintf(", %x", name[cnt++]); if (cnt < info.nlen) |