mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
Fix potential array overrun, found by Coverity
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
f483a8aeaa
commit
ceb4d04d23
1 file changed
+1
-1
+1
-1
@@ -804,7 +804,7 @@ static int service_stop(svc_t *svc)
|
||||
|
||||
args[i++] = svc->cmd;
|
||||
/* this handles, e.g., bridge-stop br0 stop */
|
||||
for (j = 0; j < MAX_NUM_SVC_ARGS; j++) {
|
||||
for (j = 0; j < MAX_NUM_SVC_ARGS - 2; j++) {
|
||||
if (!strlen(svc->args[j]))
|
||||
break;
|
||||
args[i++] = svc->args[j];
|
||||
|
||||
Reference in new issue
Block a user