Reading the code shows that if the reply contains a single truncated entry
then rfc1035AnswersUnpack will return 0 records, possibly causing assertion
failure in rfc1035RRDestroy
/*
- * $Id: rfc1035.c,v 1.21 2001/02/07 18:56:50 hno Exp $
+ * $Id: rfc1035.c,v 1.22 2001/10/12 18:20:23 hno Exp $
*
* Low level DNS protocol routines
* AUTHOR: Duane Wessels
break;
nr++;
}
- *records = recs;
+ if (nr > 0)
+ *records = recs;
+ else
+ free(recs);
return nr;
}