commit | bae716f920e0aec449896e0e0cc32eb9e3ec6cd6 | [log] [tgz] |
---|---|---|
author | H. Peter Anvin <hpa@zytor.com> | Wed Jan 28 01:20:13 2004 +0000 |
committer | H. Peter Anvin <hpa@zytor.com> | Wed Jan 28 01:20:13 2004 +0000 |
tree | b62cafe9b3e0f04b9e3bae0bffd2025b228caa3a | |
parent | db200a085b78b58343ad02b670a25288861aed70 [diff] |
Fix memory-trashing bug
diff --git a/ash/mkinit.c b/ash/mkinit.c index 02e9491..ee92463 100644 --- a/ash/mkinit.c +++ b/ash/mkinit.c
@@ -349,7 +349,7 @@ if (! amiddecls) addchar('\n', &decls); q = NULL; - for (p = line1 + 6 ; *p != '=' && *p != '/' ; p++); + for (p = line1 + 6 ; *p && *p != '=' && *p != '/' ; p++); if (*p == '=') { /* eliminate initialization */ for (q = p ; *q && *q != ';' ; q++); if (*q == '\0')