fix in check
authorceriel <none@none>
Mon, 3 Aug 1987 18:03:23 +0000 (18:03 +0000)
committerceriel <none@none>
Mon, 3 Aug 1987 18:03:23 +0000 (18:03 +0000)
util/led/extract.c

index 38aba4b..9b27ea2 100644 (file)
@@ -73,7 +73,8 @@ get_names(head)
                 * with "the first name".
                 */
                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");
                        }
                        name.on_foff += charindex - charoff;