Commit Graph

54 Commits

Author SHA1 Message Date
Stephen F. Booth
066b5aa57e Merge pull request #492 from TsudaKageyu/duplicate-id3v2-aiff-wav
Check AIFF/WAV files for duplicate tags.
2015-03-25 08:16:41 -04:00
Tsuda Kageyu
b69973bcf2 Fix infinite loops when parsing MP4 files. 2015-02-18 11:33:10 +09:00
Tsuda Kageyu
30eac7569f Check AIFF/WAV files for duplicate tags.
AIFF/WAV files can have duplicate tags and it leads to memory leak.
2015-02-18 11:31:55 +09:00
Tsuda Kageyu
e463d14f2e Check for EOF to fix a segfault while parsing fuzzed MPC files. 2015-02-17 01:22:39 +09:00
Tsuda Kageyu
829ae2112a Check the packet size to fix a segfault error while parsing fuzzed MPC files. 2015-02-17 01:22:39 +09:00
Tsuda Kageyu
65664e6855 Check for EOF to fix an infinite loop while parsing fuzzed MPC files. 2015-02-17 01:22:39 +09:00
Tsuda Kageyu
2193d6dd84 Fix an out-of-bounds access and consequent errors while parsing fuzzed MPC files.
Consequent errors may vary: segfault, zerodiv and so forth.
2015-02-17 01:22:38 +09:00
Tsuda Kageyu
9d91610fc0 Fix a wrong parameter for zlib.
z_stream.avail_in has to be the length of the input buffer.
It will fail when frameDataLength is smaller than the actual compressed data size.
2015-01-06 18:45:42 +09:00
Tsuda Kageyu
ed253d3691 Add some tests for huge memory allocation due to bad ID3v2 frame header flags.
The tests covers #466 and #486.
Also fixes a compilation error on some compilers.
2015-01-05 09:34:30 +09:00
Lukáš Lalinský
31982660c8 Merge pull request #485 from TsudaKageyu/oga-segfault
Fix a segfault when reading faulty Ogg/FLAC files.
2015-01-01 19:48:23 +01:00
Tsuda Kageyu
5ebb2ece80 Fix a segfault when reading faulty Ogg/FLAC files. 2015-01-01 19:59:30 +09:00
Tsuda Kageyu
0d2e01df61 Fix a segfault when parsing WAV properties. 2014-12-31 01:46:30 +09:00
Tsuda Kageyu
695fb5ec16 Add a test for fuzzed WAV files. 2014-12-31 01:44:25 +09:00
Tsuda Kageyu
3b8c7d4e3a Add support for AIFF-C files. 2014-12-30 23:53:40 +09:00
Tsuda Kageyu
16ac2cd240 Added some tests for fuzzed APE files. 2014-12-23 21:02:00 +09:00
Tsuda Kageyu
269e78f1a0 Add a test for duplicate ID3v2 tags. 2014-10-21 00:16:43 +09:00
Tsuda Kageyu
a845f70c49 Added some test cases for FileRef about unsupported files 2013-06-21 15:29:00 +09:00
Michael Helmling
a095c468b2 Revert "Add a test to show a problem with properties() and duplication."
This reverts commit 6e3391a846. The "problem" demonstrated in there won't be fixed due to lack of significance.
2012-12-20 17:30:19 +01:00
Michael Helmling
6e3391a846 Add a test to show a problem with properties() and duplication. 2012-12-10 21:22:11 +01:00
Lukáš Lalinský
5e7b1da632 Add support for Ogg Opus 2012-10-13 08:55:23 +02:00
Lukáš Lalinský
e86e5f906b ID3 frame IDs with 0 should be recognized as valid
http://article.gmane.org/gmane.comp.kde.devel.taglib/2275
2012-08-17 07:50:48 +02:00
Lukáš Lalinský
930168f990 Refactoring of the Musepack SV8 properties code 2012-07-11 14:13:41 +02:00
Michael Helmling
292a377d1e Merge remote-tracking branch 'official/master' 2011-10-30 18:28:52 +01:00
Lukáš Lalinský
6ea8599313 Detect RIFF files with invalid chunk sizes
The bug report has a WAVE file with zero-sized 'data' chunk, which causes
TagLib to iterate over the file, 8 bytes in each iteration. The new code
adds a check for the chunk name, which forces it to mark the file as
invalid if the chunk name doesn't contain ASCII characters.

https://bugs.kde.org/show_bug.cgi?id=283412
2011-10-08 18:41:15 +02:00
Michael Helmling
58db919e43 More support for the unified dictionary interface.
Addded fromDict() function to ID3v2Tag. Added fromDict() and
toDict() functions to the TagUnion class (uses the first non-empty tag).
Added fromDict() and toDict() functions for the generic Tag class, only
handling common tags without duplicates. Addded preliminary mp3 test
case. Python3 bindings now available on my github site.
2011-08-27 01:18:21 +02:00
Michael Helmling
b262180857 Some preliminary work for unified dictionary tag interface support.
- toDict() and fromDict() for XiphComments
- toDict() for ID3v2 Tags
2011-08-26 21:48:40 +02:00
Mathias Panzenböck
af92db9dc0 IT: unit tests 2011-06-24 01:31:15 +02:00
Mathias Panzenböck
561cfdb0ec S3M: unit tests and bug fixes (NUL char. is not optional in S3M strings) 2011-06-23 20:08:05 +02:00
Mathias Panzenböck
7236ef4d0f S3M+IT: fix reading, IT: untested support for message writing
IT: reading was off starting with global volume because of wrong read size.
S3M+IT: correctly read the number of used patterns.
IT: fixed reading of message tag and implemented writing of message tag
(not tested yet).

I also added S3M+IT test files. TODO: Unit tests using them.
2011-06-23 05:41:23 +02:00
Mathias Panzenböck
6afb7c04b3 comment writing support and more tests for mod and xm 2011-06-19 04:27:51 +02:00
Mathias Panzenböck
5ad69f6f2a fixed mod property names and added unit test for xm 2011-06-18 03:31:49 +02:00
Mathias Panzenböck
fe356c31b4 added unit test for one flavour of .mod files 2011-06-17 05:18:49 +02:00
Frank Lai
93564a2daa ALAC file encoded by iTunes 2011-06-09 18:40:22 +02:00
Lukáš Lalinský
0a790f0017 Add a (failing) test for reading ALAC audio properties 2011-06-08 19:03:43 +02:00
Lukáš Lalinský
c21fd955ff Fix writing of new RIFF chunks at even positions
If the last chunk had an odd size, the new chunk would have been written at
odd position, which is incorrect.

This is based on the patch by Jens Dyffort, but I ended up changing the
implementation to correctly handle subsequential updates to the file.

The whole RIFF code really needs to be rewritten in a different way...

BUG:243954


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1220223 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2011-02-13 10:27:56 +00:00
Lukáš Lalinský
3741c39295 Full read/write support for FLAC pictures
NEEDS MORE TESTING

BUG:218696


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1212863 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2011-01-08 10:36:26 +00:00
Lukáš Lalinský
56343767ce Fix reading of WavPack streams without a length information in the header
When the WavPack's total_samples header fiels contains -1, try to find
the final block and get the number of samples from there as
block_index + block_samples.

BUG:258016


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1201476 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-11-27 20:58:57 +00:00
Lukáš Lalinský
dcef0fbad2 Read-only support for FLAC picture blocks
CCBUG:218696


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1154376 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-07-25 11:06:36 +00:00
Lukáš Lalinský
1d10bde500 Added reading of WAV audio length
BUG:116033


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1148614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-07-11 09:47:58 +00:00
Lukáš Lalinský
ab1bc06172 Support for reading/writing tags from Monkey's Audio files
Patch by Alex Novichkov, slightly modified by me (code formatting + tests).


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1145554 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-07-03 11:32:27 +00:00
Lukáš Lalinský
9dcdecc810 Fix parsing of regular 32-bit integers in SynchData::toUInt()
BUG:231075


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1115275 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-04-15 20:22:21 +00:00
Lukáš Lalinský
e76466097b Don't upgrade ID3v2.2 TDA frame when upgrading to TRCD
We already do this for TDAT. Using both parts, the year and the date,
would be better we the code currently doesn't have enough context to
do that.

BUG:228968


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1110552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-04-03 16:58:03 +00:00
Lukáš Lalinský
3943668603 Ignore trailing non-data atoms when parsing MP4 covr atoms
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1110209 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-04-02 12:14:32 +00:00
Lukáš Lalinský
c962d78a57 Always read tags from the first Vorbis Comment block in FLAC files
Prevously TagLib saved tags to the first block, but read them from the
last one. Having multiple VC blocks is a non-standard situation, but
this is the best we can do (libFLAC also uses the first block in the
case of multiple VC blocks). 

BUG:211089


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1043985 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-11-02 19:41:12 +00:00
Lukáš Lalinský
76b6d4fc9e Fixed ID3v1-style genre to string conversion in MP4 files
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1042312 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-10-29 15:53:20 +00:00
Lukáš Lalinský
724a68c79c Don't wrote the Vorbis framing bit to OggFLAC files
https://bugs.launchpad.net/maxosx/+bug/445970
http://www.hydrogenaudio.org/forums/index.php?showtopic=75263

CCMAIL:me@sbooth.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1039704 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-10-24 12:01:40 +00:00
Lukáš Lalinský
8636eb749a Handle RIFF chunk padding and ignore trailing garbage
This is based on patches by Marc Halbruegge, but those only deal with
read-only cases. The code now also correctly adds padding to RIFF
chunks, and calculates offsets in chunkData taking the padding into
account.

BUG:171957
BUG:175781


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1003745 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-07-28 18:29:39 +00:00
Lukáš Lalinský
834d9d6b23 Partial support for 64-bit atoms
We still can't handle actual 64-bit atoms, but we can handle 32-bit sizes
stored in 64 bits.

CCBUG:198730


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1001897 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-07-24 13:08:51 +00:00
Lukáš Lalinský
94a402395b Fix off-by-one error in MP4::Tag when looking for free padding to use
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@961160 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-04-29 15:12:19 +00:00
Lukáš Lalinský
5df6ef092b Add my old WMA and MP4 code. It is disabled by default, must be explicitly enabled to be compiled.
Scott: If you think this is really a bad idea, please revert.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@883108 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2008-11-12 08:17:11 +00:00