treewide: fix many null dereference reports
Add defensive handling for several NULL allocation and formatting paths reported across issues #820-#829. Fixes #820, fixes #821, fixes #822, fixes #823, fixes #825, fixes #828
This commit is contained in:
committed by
Nico Williams
parent
9a9da70626
commit
de7aa57362
+1
-1
@@ -95,7 +95,7 @@ rk_dns_type_to_string(int type)
|
||||
for(p = stot; p->name; p++)
|
||||
if(type == p->type)
|
||||
return p->name;
|
||||
return NULL;
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
#if ((defined(HAVE_RES_SEARCH) || defined(HAVE_RES_NSEARCH)) && defined(HAVE_DN_EXPAND)) || defined(HAVE_WINDNS)
|
||||
|
||||
Reference in New Issue
Block a user