diff --git a/mach/proto/top/top.c b/mach/proto/top/top.c index 178dd450e..5d57fa1de 100644 --- a/mach/proto/top/top.c +++ b/mach/proto/top/top.c @@ -330,7 +330,7 @@ labeldef(ip) int oplen; p = ip->rest_line; - while( *p != LABEL_TERMINATOR) p++; + while(*p && (*p != LABEL_TERMINATOR)) p++; oplen = p - ip->rest_line; if (oplen == 0 || oplen > MAXOPLEN) return; strncpy(ip->op[0],ip->rest_line,oplen);