mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdsfs: fix out of bound access in config file parsing
The tmp buffer is one byte too short missing space for the final \0 byte leading to out of bound access. Fix by increasing the buffer by one. Reported-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
0fafbcf3bb
commit
2ece47ee1a
@@ -1400,7 +1400,7 @@ static void zdsfs_process_config_file(const char *config)
|
||||
continue;
|
||||
|
||||
/* remove all whitespaces */
|
||||
tmp = util_malloc(strlen(line));
|
||||
tmp = util_malloc(strlen(line) + 1);
|
||||
remove_whitespace(line, tmp);
|
||||
|
||||
key = strtok(tmp, delimiter);
|
||||
|
||||
Reference in New Issue
Block a user