Skip to content
Browse files

Annodex #493: Handle comments of form "KEY="

Handle the case where the comment has no value but has an = sign.

Tested with the files in that bug report:
http://upload.wikimedia.org/wikipedia/commons/e/ee/SongFromCottonField.ogg
http://whatthebert.com/ihameed/boomtss/zurie-piratesxaimusremix.ogg
  • Loading branch information...
1 parent e56f4d8 commit 221d0de75b91849c6edc8aaea20feac488a28075 @kfish committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/libfishsound/comments.c
View
5 src/libfishsound/comments.c
@@ -478,13 +478,16 @@ fish_sound_comments_decode (FishSound * fsound, unsigned char * comments,
c+=4;
if (len > (unsigned long) (end-c)) return -1;
+ n = 0;
name = c;
value = fs_index_len (c, '=', len);
if (value) {
*value = '\0';
value++;
-
n = c+len - value;
+ }
+
+ if (n != 0) {
if ((nvalue = fs_strdup_len (value, n)) == NULL)
return FISH_SOUND_ERR_OUT_OF_MEMORY;

0 comments on commit 221d0de

Please sign in to comment.
Something went wrong with that request. Please try again.