diff -up adns-1.4/src/general.c.rh514838 adns-1.4/src/general.c --- adns-1.4/src/general.c.rh514838 2006-04-08 16:36:57.000000000 +0200 +++ adns-1.4/src/general.c 2009-08-06 13:55:06.752562767 +0200 @@ -267,6 +267,8 @@ static const struct sinfo { SINFO( nodata, "No such data" ) }; +static const char *unknown_error_str = "unknown error code"; + static int si_compar(const void *key, const void *elem) { const adns_status *st= key; const struct sinfo *si= elem; @@ -283,7 +285,7 @@ const char *adns_strerror(adns_status st const struct sinfo *si; si= findsinfo(st); - return si->string; + return (si == NULL) ? unknown_error_str : si->string; } const char *adns_errabbrev(adns_status st) {