diff options
| author | Kip Macy <kmacy@FreeBSD.org> | 2009-05-24 20:49:22 +0000 |
|---|---|---|
| committer | Kip Macy <kmacy@FreeBSD.org> | 2009-05-24 20:49:22 +0000 |
| commit | a18db9896796d301e85b4d758729436a4cff293b (patch) | |
| tree | ed604f69e4f44c3b384f5bd991b0f12a05c9607d | |
| parent | 5f59ef92b8b62d3766b73f01277148a841e1c971 (diff) | |
Notes
| -rw-r--r-- | usr.sbin/btxld/btxld.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/btxld/btxld.c b/usr.sbin/btxld/btxld.c index f255fa552818..43fa4a9a6806 100644 --- a/usr.sbin/btxld/btxld.c +++ b/usr.sbin/btxld/btxld.c @@ -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); |
