summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2006-09-05 09:44:20 +0000
committerBastien Nocera <hadess@src.gnome.org>2006-09-05 09:44:20 +0000
commit4b1041a90eb5246a0d9cb758f8b345fe8ee538e5 (patch)
treedcfb0c8b9a6647609d4cca5874ba6d6a48cea961
parent999133eaf9e467024b3ee4c94bc30edf2d854d5c (diff)
Fix possible buffer overflow that would cause a crash in the ASF
2006-09-05 Bastien Nocera <hadess@hadess.net> * src/plparse/totem-pl-parser.c: (totem_pl_parser_is_asf): Fix possible buffer overflow that would cause a crash in the ASF recognition code (Closes: #354284)
-rw-r--r--ChangeLog6
-rw-r--r--src/plparse/totem-pl-parser.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a0860d0..145641a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-05 Bastien Nocera <hadess@hadess.net>
+
+ * src/plparse/totem-pl-parser.c: (totem_pl_parser_is_asf):
+ Fix possible buffer overflow that would cause a crash in the
+ ASF recognition code (Closes: #354284)
+
2006-09-04 Bastien Nocera <hadess@hadess.net>
* configure.in: the nautilus extension requires gtk-2.0, not
diff --git a/src/plparse/totem-pl-parser.c b/src/plparse/totem-pl-parser.c
index c58e390a..47854180 100644
--- a/src/plparse/totem-pl-parser.c
+++ b/src/plparse/totem-pl-parser.c
@@ -2048,7 +2048,7 @@ totem_pl_parser_is_asf (const char *data, gsize len)
g_warning ("Couldn't dup data in totem_pl_parser_is_asf");
return FALSE;
}
- buffer[len] = '\0';
+ buffer[len - 1] = '\0';
if (strstr (buffer, "<ASX") != NULL
|| strstr (buffer, "<asx") != NULL) {
g_free (buffer);