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 4master
parent
b0861d8162
commit
6a46c2cf55
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue