Fix use of e_phoff in place of e_phnum.

This commit is contained in:
rnordier 1999-06-19 20:50:38 +00:00
parent 5f25113ddb
commit f3313ef5a0
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@
*/
/*
* $Id: boot2.c,v 1.22 1999/04/04 21:15:41 obrien Exp $
* $Id: boot2.c,v 1.23 1999/04/05 07:36:30 rnordier Exp $
*/
#include <sys/param.h>
@ -251,7 +251,7 @@ load(const char *fname)
}
} else {
fs_off = hdr.eh.e_phoff;
for (j = i = 0; i < hdr.eh.e_phoff && j < 2; i++) {
for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) {
if (xfsread(ino, ep + j, sizeof(ep[0])))
return;
if (ep[j].p_type == PT_LOAD)

View File

@ -14,7 +14,7 @@
*/
/*
* $Id: boot2.c,v 1.22 1999/04/04 21:15:41 obrien Exp $
* $Id: boot2.c,v 1.23 1999/04/05 07:36:30 rnordier Exp $
*/
#include <sys/param.h>
@ -251,7 +251,7 @@ load(const char *fname)
}
} else {
fs_off = hdr.eh.e_phoff;
for (j = i = 0; i < hdr.eh.e_phoff && j < 2; i++) {
for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) {
if (xfsread(ino, ep + j, sizeof(ep[0])))
return;
if (ep[j].p_type == PT_LOAD)