]> granicus.if.org Git - procps-ng/commitdiff
Stopped ps from crashing if System.map is multiple of 1024
authorcsmall <>
Fri, 12 Apr 2002 11:12:58 +0000 (11:12 +0000)
committercsmall <>
Fri, 12 Apr 2002 11:12:58 +0000 (11:12 +0000)
ChangeLog
proc/ksym.c

index ed2f269585f919ea3215113250339e61efbeb45f..2a38f8d758006b422a729025b5da15160d501d53 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,4 +8,7 @@ Version ????
 
        Put most of the Debian diffs in.
 
+       ps no longer crashes if System.map is %1024. Debian #109237
+       (Thanks Colin Walters)
+
 
index 8925bd5a7799a06abbe67dcd6022af1b940000a1..4549ffaa27ea5c9e8ca940c2039749252d5dd1df 100644 (file)
@@ -356,7 +356,7 @@ static int sysmap_mmap(const char *filename, void (*message)(const char *, ...))
     sysmap_index = vp;
     for(;;){
       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 */
         if(*Version) goto bad_version;
         if(!ksyms_index) return 1; /* if can not verify, assume success */