Fix a NULL-dereferencing, that caused a segfault with QMAGIC (yay).

This commit is contained in:
sef 1993-05-03 20:51:56 +00:00
parent aabb4903c2
commit 35127652d7

View File

@ -170,7 +170,9 @@ odoffset(argc, argvp)
*
* We assumes it's a file if the offset is bad.
*/
p = **argvp;
p = argc == 1 ? (*argvp)[0] : (*argvp)[1];
if (*p != '+' && (argc < 2 ||
(!isdigit(p[0]) && (p[0] != 'x' || !ishexdigit(p[1])))))
return;