From 0dae46cbc7f31e9ca9700016ae486f709b940baf Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Thu, 24 Jun 1999 19:15:55 +0000 Subject: [PATCH] dns_rdataslab_subtract() bug fixes --- lib/dns/rdataslab.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dns/rdataslab.c b/lib/dns/rdataslab.c index 1665419e8b..ec8dbf524d 100644 --- a/lib/dns/rdataslab.c +++ b/lib/dns/rdataslab.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: rdataslab.c,v 1.5 1999/06/17 00:31:32 halley Exp $ */ +/* $Id: rdataslab.c,v 1.6 1999/06/24 19:15:55 gson Exp $ */ #include @@ -298,7 +298,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab, scount = *scurrent++ * 256; scount += *scurrent++; sstart = scurrent; - INSIST(mcount > 0 && mcount > 0); + INSIST(mcount > 0 && scount > 0); /* * Yes, this is inefficient! @@ -372,7 +372,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab, /* * Copy the parts of mslab not in sslab. */ - mcurrent = sslab + reservelen; + mcurrent = mslab + reservelen; mcount = *mcurrent++ * 256; mcount += *mcurrent++; do {