fix in check

This commit is contained in:
ceriel 1987-08-03 18:03:23 +00:00
parent 3ce2cee0a5
commit 3883f47fd0

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;