diff options
author | gohai <gottfried.haider@gmail.com> | 2011-07-18 23:56:12 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-09-29 22:10:46 +0200 |
commit | aaf2942001625d82109e1ebf50a05aef29c65dca (patch) | |
tree | cf5879329147fa7963f468db20e0d3cc0bb6bb50 /junklib.c | |
parent | 2df9cf296447c7f58f338340bf463584244bf4d4 (diff) |
fix off-by-one in convstr_id3v2
The previous check started with the semi-last character and went forward. This erroneously truncated strings such as 00 52 41 54 49 4e 47 00 33 (a TXXX with "RATING", followed by a 00 and a single byte value).
Diffstat (limited to 'junklib.c')
-rw-r--r-- | junklib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -734,7 +734,7 @@ convstr_id3v2 (int version, uint8_t encoding, const unsigned char* str, int sz) } } // trim trailing linebreaks - for (n = converted_sz-2; n >= 0; n--) { + for (n = converted_sz-1; n >= 0; n--) { if (out[n] == '\n') { out[n] = 0; } |