Make sure that we reset the filter pointer after we realloc the filter.
authorsharpe <sharpe@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 28 Nov 2005 08:31:11 +0000 (08:31 +0000)
committersharpe <sharpe@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 28 Nov 2005 08:31:11 +0000 (08:31 +0000)
This should be simplified ... calc all the space required once and then realloc once etc.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16614 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-ldap.c

index 622e72f2eaf7dee546dc6e736fcbed1eba8e00fe..a5125f14b33bd5bc14768eba044a4ece92cde445 100644 (file)
@@ -944,6 +944,7 @@ static int parse_filter_extensibleMatch(ASN1_SCK *a, char **filter, guint *filte
    
     *filter_length +=1;
     *filter = g_realloc(*filter, *filter_length);
+    filterp = *filter + strlen(*filter);
     *filterp++ = ')';
     *filterp = '\0';   /* There had better be space */