fix an obvious bug when loading sun relocatable objects.

When was this code last triggered?
XXX I didn't run the code, was looking for something else.
This commit is contained in:
aymeric 2001-10-08 22:09:20 +00:00
parent 9bf40ca410
commit 866fad714d
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: lib.c,v 1.23 2000/12/16 09:29:29 mycroft Exp $ */
/* $NetBSD: lib.c,v 1.24 2001/10/08 22:09:20 aymeric Exp $ */
/*
* - library routines
@ -662,7 +662,7 @@ read_shared_object(fd, entry)
(TEXT_START(entry->header) - N_TXTOFF(entry->header)),
L_SET) == (off_t)-1)
err(1, "%s: lseek", get_file_name(entry));
if (read(fd, (char *)nzp, n) != n)
if (read(fd, has_nz ? (char *) nzp : (char *) np, n) != n)
errx(1, "%s: premature EOF reading symbols ",
get_file_name(entry));