[asterisk-dev] bug of mmap return in 1.4.0

Russell Bryant russell at digium.com
Sun Dec 24 00:18:03 MST 2006


andy wang wrote:
> There is a bug on 1.4.0 Chan_iax2.c::try_firmware::1413
> 
>     fwh = mmap(NULL, stbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
>     if (!fwh) {
>         ast_log(LOG_WARNING, "mmap failed: %s\n", strerror(errno));
>         close(fd);
>         return -1;
>     }
> 
> if mmap fails it will return (-1)

Nice catch.  This affects 1.2, as well.  I'll go ahead and fix it.

Thanks!

-- 
Russell Bryant
Software Engineer
Digium, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: russell.vcf
Type: text/x-vcard
Size: 266 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20061224/414706e1/russell.vcf


More information about the asterisk-dev mailing list