summaryrefslogblamecommitdiff
path: root/user/libid3tag/CVE-2008-2109.patch
blob: 6226d14af7a2da05608ad6dd0eb7f84ed899df91 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                               
--- a/field.c.orig	2008-05-05 09:49:15.000000000 -0400
+++ b/field.c	2008-05-05 09:49:25.000000000 -0400
@@ -291,7 +291,7 @@
 
       end = *ptr + length;
 
-      while (end - *ptr > 0) {
+      while (end - *ptr > 0 && **ptr != '\0') {
 	ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0);
 	if (ucs4 == 0)
 	  goto fail;