fix in check

This commit is contained in:
ceriel
1987-08-03 18:03:23 +00:00
parent 7eed6823a1
commit f5f47f26fc

View File

@@ -73,7 +73,8 @@ get_names(head)
* with "the first name". * with "the first name".
*/ */
if (name.on_foff) { if (name.on_foff) {
if (name.on_foff < 0 || name.on_foff >= charoff) { if (name.on_foff < charoff ||
name.on_foff >= charoff+head->oh_nchar) {
fatal("illegal offset in name"); fatal("illegal offset in name");
} }
name.on_foff += charindex - charoff; name.on_foff += charindex - charoff;