diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-04-03 23:54:58 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-04-03 23:54:58 +0400 |
commit | 7810aa7cdb9ec62f42f53c0db4283b6e547357e4 (patch) | |
tree | f8997b2b4c17b131ee82e97de4226689494267f2 /winsup/cygwin | |
parent | 84681ea68987b5e51f82fca7b7caf7e8eb315493 (diff) |
* fhandler_proc.cc (format_proc_loadavg): Raise too small buffer size
to avoid overwriting unrelated cygheap memory.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_proc.cc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e2cf0dbab..adc9b1f43 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2013-04-03 Corinna Vinschen <corinna@vinschen.de> + * fhandler_proc.cc (format_proc_loadavg): Raise too small buffer size + to avoid overwriting unrelated cygheap memory. + +2013-04-03 Corinna Vinschen <corinna@vinschen.de> + * path.cc (class suffix_scan): Add member namelen. (suffix_scan::name_len): New method. (suffix_scan::has): Store namelen since we have it already anyway. diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index afd206365..57a1532a2 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -426,7 +426,7 @@ format_proc_loadavg (void *, char *&destbuf) break; } - destbuf = (char *) crealloc_abort (destbuf, 16); + destbuf = (char *) crealloc_abort (destbuf, 48); return __small_sprintf (destbuf, "%u.%02u %u.%02u %u.%02u %u/%u\n", 0, 0, 0, 0, 0, 0, running, pids.npids); } |