Ethereal-users: Re: [Ethereal-users] core dump when reading snoop of ldap protocol

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 29 Jul 2003 13:59:18 -0700

On Sunday, July 27, 2003, at 5:55 PM, Matt Selsky wrote:

I'm using a null DN to do the bind.  The problem appears to be with
read_string_value()

static int read_string_value(ASN1_SCK *a, proto_tree *tree, int hf_id,
	proto_item **new_item, char **s, int start, guint length)

s = 0 and length = 0

Since length = 0,

    string = "(null)";


But at the end of the function:

  if (s && length)
    *s = string;
  else if (length)
    g_free(string);

s should be set to string, but it's not since s is null.

s should not be set to string.

The variable *pointed to by s* should be set to string.

Given that s is null, it does not point to any variable, and therefore there is nothing to set to string.