Skip to content

Add null terminator to get_from_pipe output

The functions in sysdeps/linux/disk.c use string functions like sscanf to parse the output of get_from_pipe. However, get_from_pipe does not append a null terminator to the output buffer, so those string functions will run off the end of the output, into uninitialized data from the stack. To avoid this, this commit makes get_from_pipe append a null terminator to the end of the string.

Merge request reports

Loading