svn commit: r192697 - stable/7/usr.sbin/btxld
Kip Macy
kmacy at FreeBSD.org
Sun May 24 20:49:24 UTC 2009
Author: kmacy
Date: Sun May 24 20:49:22 2009
New Revision: 192697
URL: http://svn.freebsd.org/changeset/base/192697
Log:
merge 177933
Allow for a zero length 'loader'.
Modified:
stable/7/usr.sbin/btxld/btxld.c
Modified: stable/7/usr.sbin/btxld/btxld.c
==============================================================================
--- stable/7/usr.sbin/btxld/btxld.c Sun May 24 20:34:29 2009 (r192696)
+++ stable/7/usr.sbin/btxld/btxld.c Sun May 24 20:49:22 2009 (r192697)
@@ -336,6 +336,8 @@ gethdr(int fd, struct hdr *hdr)
if (sb.st_size > MAXU32)
errx(1, "%s: Too big", fname);
hdr->size = sb.st_size;
+ if (!hdr->size)
+ return;
if ((p = mmap(NULL, hdr->size, PROT_READ, MAP_SHARED, fd,
0)) == MAP_FAILED)
err(2, "%s", fname);
More information about the svn-src-stable
mailing list