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:
Roland C. Dowdeswell
2026-05-27 18:31:12 +01:00
committed by Nico Williams
parent 9a9da70626
commit de7aa57362
4 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -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)