Re: jobserver_fds->list buffer overflow

2007-01-08 Thread Paul Smith
On Mon, 2007-01-08 at 22:26 -0500, Ken Takusagawa wrote: > In main.c we have > > jobserver_fds->list[0] = xmalloc ((sizeof ("1024")*2)+1); > > sprintf (jobserver_fds->list[0], "%d,%d", job_fds[0], job_fds[1]); > > Shouldn't xmalloc get a "+2" instead of "+1"? 1 for the comma, and >

jobserver_fds->list buffer overflow

2007-01-08 Thread Ken Takusagawa
In main.c we have jobserver_fds->list[0] = xmalloc ((sizeof ("1024")*2)+1); sprintf (jobserver_fds->list[0], "%d,%d", job_fds[0], job_fds[1]); Shouldn't xmalloc get a "+2" instead of "+1"? 1 for the comma, and one for the null terminator? --ken