diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-25 00:10:34 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-25 00:10:34 -0400 |
commit | 6a46c2cf55c9e9c1cb2ba3d2f0a650ef65dd649b (patch) | |
tree | 78409c31d25dcd8cee45f9431686196b08c2c57b /IkiWiki | |
parent | b0861d816233ef205a6b6e608c7c5b9a3f892c6c (diff) | |
download | ikiwiki-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
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Wrapper.pm | 2 |
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"); |