mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev: Harden against invalid udev data
Reduce chances of unintended side-effects when importing udev data which might have been corrupted. Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com> Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
5e93b53f78
commit
3cf95a1d92
@@ -84,7 +84,7 @@ out:
|
||||
|
||||
static void get_site_from_line(char *line, int *site, bool *in_site)
|
||||
{
|
||||
char site_str[2];
|
||||
char site_str[3] = { 0 };
|
||||
|
||||
if (starts_with(line, SITE_BLOCK_START)) {
|
||||
memcpy(site_str, line + sizeof(SITE_BLOCK_START), 2);
|
||||
|
||||
Reference in New Issue
Block a user