libgimpbase: read up to 255 bytes into a 256 bytes buffer.
Otherwise if we add a NUL byte after the last byte, we might right past the allocated memory. Thanks to Massimo for reporting this error raised by Address Sanitizer and valgrind (cf. #7539).
This commit is contained in:
parent
08eba7fde7
commit
7c99fa02f9
1 changed files with 1 additions and 1 deletions
|
|
@ -1342,7 +1342,7 @@ gimp_stack_trace_print (const gchar *prog_name,
|
|||
*/
|
||||
close (out_fd[1]);
|
||||
|
||||
while ((read_n = read (out_fd[0], buffer, 256)) != 0)
|
||||
while ((read_n = read (out_fd[0], buffer, 255)) != 0)
|
||||
{
|
||||
if (read_n < 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue