1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 11_unknown_encoding.dpatch by Andreas Henriksson <andreas@fatal.se>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: In case of an unknown/invalid encoding, id3_parse_string() will
6 ## DP: return NULL, but the return value wasn't checked resulting
7 ## DP: in segfault in id3_ucs4_length(). This is the only place
8 ## DP: the return value wasn't checked.
11 diff -urNad libid3tag-0.15
.1b~
/compat.gperf libid3tag-0.15
.1b
/compat.gperf
12 --- libid3tag-0.15
.1b~
/compat.gperf
2004-01-23 09:41:32.000000000 +0000
13 +++ libid3tag-0.15
.1b
/compat.gperf
2007-01-14 14:36:53.000000000 +0000
16 encoding
= id3_parse_uint
(&data
, 1);
17 string
= id3_parse_string
(&data
, end
- data
, encoding
, 0);
23 if (id3_ucs4_length
(string
) < 4) {
25 diff -urNad libid3tag-0.15
.1b~
/parse.c libid3tag-0.15
.1b
/parse.c
26 --- libid3tag-0.15
.1b~
/parse.c
2004-01-23 09:41:32.000000000 +0000
27 +++ libid3tag-0.15
.1b
/parse.c
2007-01-14 14:37:34.000000000 +0000
29 case ID3_FIELD_TEXTENCODING_UTF_8
:
30 ucs4
= id3_utf8_deserialize
(ptr
, length
);
33 + /* FIXME
: Unknown encoding
! Print warning?
*/