mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
util_run_program(): fix possible buffer overflow #2
I'm not sure how likely it is for UTIL_PATH_SIZE to have an odd value (maybe it has right now? :-), but I guess making this universally correct doesn't hurt ...
This commit is contained in:
parent
1da6c797fd
commit
04d4a6f858
@ -251,7 +251,7 @@ int util_run_program(struct udev *udev, const char *command, char **envp,
|
||||
pid_t pid;
|
||||
char arg[UTIL_PATH_SIZE];
|
||||
char program[UTIL_PATH_SIZE];
|
||||
char *argv[(sizeof(arg) / 2) + 1];
|
||||
char *argv[((sizeof(arg) + 1) / 2) + 1];
|
||||
int devnull;
|
||||
int i;
|
||||
int err = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user