Avoided potential dereference of NULL. Thanks Eliska Svobodova.

This commit is contained in:
2019-08-13 18:04:59 +02:00
parent 56a596208c
commit e17db6aa3e
3 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd,
else
do_expand= (xorriso->do_iso_rr_pattern==1 && !(flag&4)) || (flag & 512);
if(flag&256) {
if(*optv < argv || (*optv >= argv + argc && argc > 0))
if(argv == NULL || *optv < argv || (*optv >= argv + argc && argc > 0))
Sfile_destroy_argv(optc, optv, 0);
return(1);
}