aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-01-25 00:10:34 -0400
committerJoey Hess <joeyh@joeyh.name>2015-01-25 00:10:34 -0400
commit6a46c2cf55c9e9c1cb2ba3d2f0a650ef65dd649b (patch)
tree78409c31d25dcd8cee45f9431686196b08c2c57b
parentb0861d816233ef205a6b6e608c7c5b9a3f892c6c (diff)
downloadikiwiki-6a46c2cf55c9e9c1cb2ba3d2f0a650ef65dd649b.tar
ikiwiki-6a46c2cf55c9e9c1cb2ba3d2f0a650ef65dd649b.tar.gz
fix another unchecked malloc
<joeyh> any parrticular reason 12? <igli> well maximum a 32-bit can go is 10 chars <igli> so one for \0 and round up to 4
-rw-r--r--IkiWiki/Wrapper.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
index 583841d6c..69500029c 100644
--- a/IkiWiki/Wrapper.pm
+++ b/IkiWiki/Wrapper.pm
@@ -200,7 +200,7 @@ void addenv(char *var, char *val) {
}
void set_cgilock_fd (int lockfd) {
- char *fd_s=malloc(8);
+ char fd_s[12];
sprintf(fd_s, "%i", lockfd);
if (setenv("IKIWIKI_CGILOCK_FD", fd_s, 1) != 0) {
perror("setenv");