[gst-cvs] gst-plugins-base: rtsp: Corrected the HTTP digest authorization computation .
Peter Kjellerstedt
pkj at kemper.freedesktop.org
Tue Aug 18 07:56:15 PDT 2009
Module: gst-plugins-base
Branch: master
Commit: 3b888cfe2a8c6fda76daaba45f251e708565c194
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=3b888cfe2a8c6fda76daaba45f251e708565c194
Author: Peter Kjellerstedt <pkj at axis.com>
Date: Tue Aug 18 16:49:58 2009 +0200
rtsp: Corrected the HTTP digest authorization computation.
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...
---
gst-libs/gst/rtsp/gstrtspconnection.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c
index 954ee98..58e5d2e 100644
--- a/gst-libs/gst/rtsp/gstrtspconnection.c
+++ b/gst-libs/gst/rtsp/gstrtspconnection.c
@@ -933,7 +933,7 @@ auth_digest_compute_response (const gchar * method,
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);
More information about the Gstreamer-commits
mailing list