summaryrefslogtreecommitdiffstats
path: root/src/io/streamtest.cpp
diff options
context:
space:
mode:
authorBryce Harrington <bryce@bryceharrington.org>2015-08-29 23:30:03 +0000
committerbryce <bryce@ubuntu.com>2015-08-29 23:30:03 +0000
commit04d1dc5111b134e8618dd306149dc7a768838c77 (patch)
treec6979e33acaf4879e409b1aac757e638b67a40a9 /src/io/streamtest.cpp
parentFix a bug on ToogleButton Parameter when call a function without showing the ... (diff)
downloadinkscape-04d1dc5111b134e8618dd306149dc7a768838c77.tar.gz
inkscape-04d1dc5111b134e8618dd306149dc7a768838c77.zip
Ensure strncpy'd strings are null terminated
(bzr r14332)
Diffstat (limited to 'src/io/streamtest.cpp')
-rw-r--r--src/io/streamtest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/io/streamtest.cpp b/src/io/streamtest.cpp
index 2030e6a85..ec59ac4a6 100644
--- a/src/io/streamtest.cpp
+++ b/src/io/streamtest.cpp
@@ -202,6 +202,7 @@ void path_init(char *path, char *name)
exit(1);
}
strncpy(ptr+1,name,strlen(name)+1);
+ path[PATH_MAX-1] = '\0';
printf("'%s'\n",path);
}