Avoid NULL pointer dereferencing in modlist_lookup2().

PR:		56570
Submitted by:	Thomas Wintergerst <Thomas.Wintergerst@nord-com.net>
This commit is contained in:
Max Khon 2003-09-23 14:42:38 +00:00
parent 312ebe0323
commit b15572e3fc

View File

@ -1086,7 +1086,7 @@ modlist_lookup2(const char *name, struct mod_depend *verinfo)
return (mod);
if (ver >= verinfo->md_ver_minimum &&
ver <= verinfo->md_ver_maximum &&
ver > bestmod->version)
(bestmod == NULL || ver > bestmod->version))
bestmod = mod;
}
return (bestmod);