mirror of
https://github.com/slicer69/doas
synced 2024-10-01 13:43:37 +00:00
Updated license file.
Fixes potential buffer overflow on Linux systems. (Thanks to Duncaen for pointing out the issue.)
This commit is contained in:
parent
31f072078a
commit
261c216449
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2016, Jesse Smith
|
||||
Copyright (c) 2017, Jesse Smith
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
|
6
doas.c
6
doas.c
|
@ -415,10 +415,10 @@ main(int argc, char **argv)
|
|||
}
|
||||
#endif
|
||||
#ifdef linux
|
||||
strncpy(cmdline, argv[0], sizeof(cmdline));
|
||||
strncpy(cmdline, argv[0], sizeof(cmdline) - 1);
|
||||
for (i = 1; i < argc; i++) {
|
||||
strncat(cmdline, " ", sizeof(cmdline));
|
||||
strncat(cmdline, argv[i], sizeof(cmdline));
|
||||
strncat(cmdline, " ", sizeof(cmdline) - strlen(cmdline) - 1);
|
||||
strncat(cmdline, argv[i], sizeof(cmdline) - strlen(cmdline) - 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue