Fix a NULL-dereferencing, that caused a segfault with QMAGIC (yay).
This commit is contained in:
parent
aabb4903c2
commit
35127652d7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user