elm quicklaunch binary - fix possible 0 termination issue with strings
the input strings for agrs/env could be not 0 terminated tho the sender guarantees it. ensure they are by 0'ing the last byte fix CID 1353607
This commit is contained in:
parent
1e4b63e885
commit
e3f1984833
|
@ -114,6 +114,7 @@ handle_run(int fd, unsigned long bytes)
|
|||
return;
|
||||
}
|
||||
close(fd);
|
||||
if (bytes > 0) buf[bytes - 1] = 0;
|
||||
|
||||
argc = ((unsigned long *)(buf))[0];
|
||||
envnum = ((unsigned long *)(buf))[1];
|
||||
|
|
Loading…
Reference in New Issue