* fhandler_proc.cc (format_proc_loadavg): Raise too small buffer size

to avoid overwriting unrelated cygheap memory.
This commit is contained in:
Corinna Vinschen 2013-04-03 19:54:58 +00:00
parent 84681ea689
commit 7810aa7cdb
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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);
}