mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-11 14:10:34 +00:00
Avoid NULL pointer dereferencing in modlist_lookup2().
PR: 56570 Submitted by: Thomas Wintergerst <Thomas.Wintergerst@nord-com.net>
This commit is contained in:
parent
312ebe0323
commit
b15572e3fc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120382
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user