diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-27 13:44:14 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-27 13:44:14 -0500 |
commit | b5919aefd1ca043ca26583f94721fb75c72ec9a4 (patch) | |
tree | 1e517222651d1b9f4b64ce47e9759cf3cea69ecb /src/spm.c | |
parent | ea01a40084b4e09c8407886a5070a77aeba56d63 (diff) | |
download | spmc-b5919aefd1ca043ca26583f94721fb75c72ec9a4.tar.gz |
Fix some buffer overflows, add a few more
Diffstat (limited to 'src/spm.c')
-rw-r--r-- | src/spm.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -152,11 +152,11 @@ int main(int argc, char *argv[], char *arge[]) { // TODO: Move environment allocation out of (above) this loop if possible // TODO: replace variables below with SPM_Hierarchy, and write some control functions - char *spm_binpath = join((char *[]) {root, "bin"}, DIRSEPS); - char *spm_includepath = join((char *[]) {root, "include"}, DIRSEPS); - char *spm_libpath = join((char *[]) {root, "lib"}, DIRSEPS); - char *spm_datapath = join((char *[]) {root, "share"}, DIRSEPS); - char *spm_manpath = join((char *[]) {spm_datapath, "man"}, DIRSEPS); + char *spm_binpath = join((char *[]) {root, "bin", NULL}, DIRSEPS); + char *spm_includepath = join((char *[]) {root, "include", NULL}, DIRSEPS); + char *spm_libpath = join((char *[]) {root, "lib", NULL}, DIRSEPS); + char *spm_datapath = join((char *[]) {root, "share", NULL}, DIRSEPS); + char *spm_manpath = join((char *[]) {spm_datapath, "man", NULL}, DIRSEPS); runtime_set(rt, "SPM_BIN", spm_binpath); runtime_set(rt, "SPM_INCLUDE", spm_includepath); |