diff --git a/hdr/nls.h b/hdr/nls.h index bc075cf..fda3336 100644 --- a/hdr/nls.h +++ b/hdr/nls.h @@ -435,7 +435,10 @@ struct nlsPackage { /* the contents of one chain item of the struct nlsDBCS { /* The internal structure is unknown to me */ UWORD numEntries; - UWORD dbcsTbl[1]; + UWORD dbcsTbl[4]; /* I don't know max size but it should need + at least 3 words (6 bytes) + ({0x81,0x9f,0xe0,0xfc,0,0} for CP932-Japan) + -- lpproj 2014/10/27 */ }; struct nlsCharTbl { diff --git a/kernel/config.c b/kernel/config.c index b3e572d..f53797f 100644 --- a/kernel/config.c +++ b/kernel/config.c @@ -1542,7 +1542,7 @@ err:printf("%s has invalid format\n", filename); { if (hdr[i].length != 6) goto err; - if (hdr[i].id < 1 || hdr[i].id > 6 || hdr[i].id == 3) + if (hdr[i].id < 1 || hdr[i].id > 7 || hdr[i].id == 3) continue; if (lseek(fd, hdr[i].offset) == 0xffffffffL || read(fd, &subf_data, 10) != 10