[gupnp-av] Fixed a potential memory corruption error in parse_additional_inf.
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp-av] Fixed a potential memory corruption error in parse_additional_inf.
- Date: Sun, 19 Aug 2012 16:00:56 +0000 (UTC)
commit 1ab4c1a11e0c6a1c60aa01698ddb21e11eb62978
Author: Mark Ryan <mark d ryan intel com>
Date: Wed Apr 18 14:48:08 2012 +0200
Fixed a potential memory corruption error in parse_additional_inf.
This occurs in the "DLNA.ORG_FLAGS=" portion of the protocol info
is < 8 bytes.
https://bugzilla.gnome.org/show_bug.cgi?id=674322
libgupnp-av/gupnp-protocol-info.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgupnp-av/gupnp-protocol-info.c b/libgupnp-av/gupnp-protocol-info.c
index e7a933f..b8ac451 100644
--- a/libgupnp-av/gupnp-protocol-info.c
+++ b/libgupnp-av/gupnp-protocol-info.c
@@ -146,8 +146,8 @@ parse_additional_info (const char *additional_info,
"DLNA.ORG_FLAGS=");
if (p != NULL) {
p += 15; /* end of "DLNA.ORG_FLAGS=" */
-
- p[8] = '\0';
+ if (strlen (p) > 8)
+ p[8] = '\0';
gupnp_protocol_info_set_dlna_flags
(info,
strtoul (p, NULL, 16));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]