From e45b68bc34c737af3002555981e6d07ec4b00f8a Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Mon, 13 Jul 2009 05:48:25 +0000 Subject: if we're reencoding a packet, don't blindly claim to have Z_NUMFIELDS --- lib/Zinternal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Zinternal.c b/lib/Zinternal.c index ef10ce7..cd29e59 100644 --- a/lib/Zinternal.c +++ b/lib/Zinternal.c @@ -869,7 +869,7 @@ Z_ZcodeFormatRawHeader(ZNotice_t *notice, return (ZERR_HEADERLEN); if (ZMakeAscii32(ptr, end-ptr, - Z_NUMFIELDS + notice->z_num_other_fields) + (notice->z_num_hdr_fields ? (notice->z_num_hdr_fields - notice->z_num_other_fields) : Z_NUMFIELDS) + notice->z_num_other_fields) == ZERR_FIELDLEN) return (ZERR_HEADERLEN); ptr += strlen(ptr)+1; -- cgit v1.2.3