sgpio/sgpio-1.2-buffer-overflow.patch
Lukáš Zaoral 3b5a8be450 fix buffer overflow with high port numbers
Resolves: RHEL-11034
2023-10-23 13:12:48 +02:00

12 lines
255 B
Diff

--- sgpio/sgpio.c
+++ sgpio/sgpio.c
@@ -126,7 +126,7 @@
int id;
int host_port;
int init;
- char name[7];
+ char name[5 /* prefix */ + 10 /* port number */ + 1 /* terminator */];
};
/* structure for the disks associated with the led structure */