Commit 221d0de7 authored by conrad's avatar conrad
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
parent e56f4d8a
...@@ -478,13 +478,16 @@ fish_sound_comments_decode (FishSound * fsound, unsigned char * comments, ...@@ -478,13 +478,16 @@ fish_sound_comments_decode (FishSound * fsound, unsigned char * comments,
c+=4; c+=4;
if (len > (unsigned long) (end-c)) return -1; if (len > (unsigned long) (end-c)) return -1;
n = 0;
name = c; name = c;
value = fs_index_len (c, '=', len); value = fs_index_len (c, '=', len);
if (value) { if (value) {
*value = '\0'; *value = '\0';
value++; value++;
n = c+len - value; n = c+len - value;
}
if (n != 0) {
if ((nvalue = fs_strdup_len (value, n)) == NULL) if ((nvalue = fs_strdup_len (value, n)) == NULL)
return FISH_SOUND_ERR_OUT_OF_MEMORY; return FISH_SOUND_ERR_OUT_OF_MEMORY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment