Do not use sizeof() on an array passed as an argument to a function and
expect to get anything but the size of a pointer. As a result only the
first 4 (or 8) bytes of the response buffer were initialized to 0 in
auth_digest_compute_response() which caused it to return a string which
was not NUL-terminated...
g_checksum_update (md5_context, (const guchar *) hex_a2, 32);
digest_string = g_checksum_get_string (md5_context);
- memset (response, 0, sizeof (response));
+ memset (response, 0, 33);
memcpy (response, digest_string, strlen (digest_string));
g_checksum_free (md5_context);