|
From: Nicholas N. <nj...@ca...> - 2004-01-09 17:40:11
|
On Fri, 9 Jan 2004, Doug Rabson wrote:
> > Diff is attached, feedback welcome. I hope the way I mmap'd in the .rc
> > files and didn't munmap them is reasonable.
>
> This will have problems if the file is exactly getpagesize() bytes long
> since the mmap'ed image won't be null terminated.
Would changing this:
f_clo = mmap(0, s1.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
to this
f_clo = mmap(0, s1.st_size+1, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
fix it?
N
|