Stopped ps from crashing if System.map is multiple of 1024
This commit is contained in:
parent
e4c67b2724
commit
264c563f54
@ -8,4 +8,7 @@ Version ????
|
|||||||
|
|
||||||
Put most of the Debian diffs in.
|
Put most of the Debian diffs in.
|
||||||
|
|
||||||
|
ps no longer crashes if System.map is %1024. Debian #109237
|
||||||
|
(Thanks Colin Walters)
|
||||||
|
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ static int sysmap_mmap(const char *filename, void (*message)(const char *, ...))
|
|||||||
sysmap_index = vp;
|
sysmap_index = vp;
|
||||||
for(;;){
|
for(;;){
|
||||||
char *vstart;
|
char *vstart;
|
||||||
if(!*endp){ /* if we reached the end */
|
if(endp - sysmap_data >= sbuf.st_size){ /* if we reached the end */
|
||||||
int i = VCNT; /* check VCNT times to verify this file */
|
int i = VCNT; /* check VCNT times to verify this file */
|
||||||
if(*Version) goto bad_version;
|
if(*Version) goto bad_version;
|
||||||
if(!ksyms_index) return 1; /* if can not verify, assume success */
|
if(!ksyms_index) return 1; /* if can not verify, assume success */
|
||||||
|
Loading…
Reference in New Issue
Block a user