From 9d67ab4cf0f242b0a04f00f133bfaa563b08fb4d Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Fri, 9 May 2014 16:52:29 +0000 Subject: cache->iadr is not supposed to be NULL, but ... (could explain crashes on Android at data.app_lib.com_httrack_android_1.libhttrack_so.0x62e4c) --- src/htslib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/htslib.c') diff --git a/src/htslib.c b/src/htslib.c index 69353b5..407f225 100644 --- a/src/htslib.c +++ b/src/htslib.c @@ -4596,8 +4596,7 @@ static t_hostent *hts_ghbn(const t_dnscache *cache, const char *const iadr, t_ho for(; cache != NULL; cache = cache->n) { assertf(cache != NULL); assertf(iadr != NULL); - assertf(cache->iadr != NULL); - if (strcmp(cache->iadr, iadr) == 0) { // ok trouvé + if (cache->iadr != NULL && strcmp(cache->iadr, iadr) == 0) { // ok trouvé if (cache->host_length > 0) { // entrée valide if (retour->h_addr_list[0]) memcpy(retour->h_addr_list[0], cache->host_addr, cache->host_length); -- cgit v1.2.3