mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
svc_start(): Fix out of bounds write to args[] array.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
a7ff1a61d5
commit
d37c451e81
1 file changed
+1
-1
@@ -479,7 +479,7 @@ int svc_start(svc_t *svc)
|
|||||||
setuid(uid);
|
setuid(uid);
|
||||||
|
|
||||||
/* Serve copy of args to process in case it modifies them. */
|
/* Serve copy of args to process in case it modifies them. */
|
||||||
for (i = 0; i < MAX_NUM_SVC_ARGS && svc->args[i][0] != 0; i++)
|
for (i = 0; i < (MAX_NUM_SVC_ARGS - 1) && svc->args[i][0] != 0; i++)
|
||||||
args[i] = svc->args[i];
|
args[i] = svc->args[i];
|
||||||
args[i] = NULL;
|
args[i] = NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user