From 5d58e1932331dbeef27c2ef79acbf46fbc28fc9f Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Tue, 22 Nov 2005 06:36:06 +0000 Subject: Remove unnecessary code to add NULLs to strings obtained with ASN1_STRING_VALUE_DECODE, as they are already there. svn path=/trunk/; revision=16560 --- epan/dissectors/packet-ldap.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index b1ba64aceb..49777ba778 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -845,9 +845,6 @@ static int parse_filter_extensibleMatch(ASN1_SCK *a, char **filter, guint *filte if (ret != ASN1_ERR_NOERROR) { return ret; } - /* NULL Terminate that string */ - matchingRule = g_realloc(matchingRule, string_length + 1); - matchingRule[string_length] = '\0'; break; case 0x02: /* Parse attributeDescription */ @@ -855,8 +852,6 @@ static int parse_filter_extensibleMatch(ASN1_SCK *a, char **filter, guint *filte if (ret != ASN1_ERR_NOERROR) { return ret; } - type = g_realloc(type, string_length + 1); - type[string_length] = '\0'; break; case 0x03: /* Parse the matchValue */ @@ -864,8 +859,6 @@ static int parse_filter_extensibleMatch(ASN1_SCK *a, char **filter, guint *filte if (ret != ASN1_ERR_NOERROR) { return ret; } - matchValue = g_realloc(matchValue, string_length); - matchValue[string_length] = '\0'; break; case 0x04: /* Parse dnAttributes boolean */ -- cgit v1.2.3