debian/0000755000000000000000000000000012227612341007166 5ustar debian/watch0000644000000000000000000000012112227612341010211 0ustar version=3 http://code.google.com/p/mp3check/downloads/list .*/mp3check-(.*)\.tgz debian/source/0000755000000000000000000000000012227612341010466 5ustar debian/source/format0000644000000000000000000000001412227612341011674 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000055712227612341010255 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 # Get the hardening flags CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) %: dh $@ override_dh_installman: dh_installman mp3check.1 debian/patches/0000755000000000000000000000000012227612341010615 5ustar debian/patches/series0000644000000000000000000000025112227612341012030 0ustar 01_restore_pristine_code.patch 10_bts450532-455727_manpage_fixes.patch 20_use_destdir_to_install.patch 30_hardening.patch 40_bts726068_remove_truncated_last_frame.patch debian/patches/40_bts726068_remove_truncated_last_frame.patch0000644000000000000000000000304212227612341021250 0ustar Description: Fix to prevent segfaults when the last audio frame is truncated. When the last audio frame is truncated, "mp3check --cut-junk-end" fails to detect and get rid of it. . In the best case scenario, when the mp3 file has no id3 tag, the corrupted frame is left as is. . In the worst case scenario, when the frame is followed by id3 tags, the frame is considered as complete and the tags are restored beyond the end of the memory-mapped file, which may cause a segmentation fault. . This patch aims to detect and eliminate any truncated last audio frame when mp3check is called with the --cut-junk-end option. Author: Xavier Hienne Bug-Ubuntu: https://launchpad.net/bugs/592766 Bug-Debian: http://bugs.debian.org/726068 --- mp3check-0.8.7.orig/mp3check.cc +++ mp3check-0.8.7/mp3check.cc @@ -1069,6 +1069,7 @@ bool cut_junk_end(const char *name, cons cok, (tag->isValidSpecs()?"valid":"invalid"), (tag->version())>>8, (tag->version())&0xff, cnor); have_a_tag = true; + rest-=128; } else { @@ -1115,18 +1116,13 @@ bool cut_junk_end(const char *name, cons // skip to next frame l = frame_length(h); + if (l > rest) break; p += l; rest -= l; start += l; } } - // in case we had found a tag - if((rest >= 128) && have_a_tag) - { - rest-=128; - } - // remove incomplete last frames //if((rest < 0) && remove_truncated_last_frame) //{ debian/patches/30_hardening.patch0000644000000000000000000000113212227612341014074 0ustar Description: allow to pass CxxFLAGS variables from env, to enable hardening flags Author: Sandro Tosi Origin: http://code.google.com/p/mp3check/source/detail?r=4 Index: mp3check/Makefile =================================================================== --- mp3check.orig/Makefile 2012-06-09 11:34:17.431755139 +0200 +++ mp3check/Makefile 2012-06-09 11:34:53.596207127 +0200 @@ -5,8 +5,8 @@ WARN = -Wall -W -g #OPT = -O2 OPT = -CPPFLAGS = $(ADDITIONAL_CPPFLAGS) -CXXFLAGS = $(WARN) $(OPT) +CPPFLAGS += $(ADDITIONAL_CPPFLAGS) +CXXFLAGS += $(WARN) $(OPT) CXX = g++ CC = $(CXX) debian/patches/20_use_destdir_to_install.patch0000644000000000000000000000071312227612341016702 0ustar Description: use DESTDIR variable to install binary Index: mp3check/Makefile =================================================================== --- mp3check.orig/Makefile 2012-04-06 22:29:19.498950014 +0200 +++ mp3check/Makefile 2012-04-06 22:31:15.843852534 +0200 @@ -32,7 +32,8 @@ strip $(TARGET) install: all strip - cp $(TARGET) /usr/local/bin + mkdir -p $(DESTDIR)/usr/bin + cp $(TARGET) $(DESTDIR)/usr/bin PACKAGE = $(TARGET)-$(VERSION) dist: debian/patches/10_bts450532-455727_manpage_fixes.patch0000644000000000000000000000420312227612341017051 0ustar Author: Sandro Tosi Description: Fix manpage as reported in BTS #450532 and #455727 and minus signs Forwarded: http://code.google.com/p/mp3check/source/detail?r=5 --- mp3check.orig/mp3check.1 +++ mp3check/mp3check.1 @@ -19,7 +19,7 @@ mp3check \- check mp3 files for consistency .SH SYNOPSIS .B mp3check -[\-03ABCEFGIKLMNPRSTWYZabcdefghlmopqrst] [\-\-accept=LIST] [\-\-alt-color] [\-\-anomaly-check] [\-\-anomaly-check] +[\-03ABCEFGIKLMNPRSTWYZabcdefghlmopqrst] [\-\-accept=LIST] [\-\-alt-color] [\-\-anomaly-check] [\-\-any-bitrate] [\-\-any\-crc] [\-\-any\-emphasis] [\-\-any-layer] [\-\-any-mode] [\-\-any-sampling] [\-\-any\-version] [\-\-ascii\-only] [\-\-color] [\-\-compact-list] [\-\-cut-junk-end] [\-\-cut-junk-start] [\-\-cut-tag-end] [\-\-dummy] [\-\-dump\-tag] [\-\-dump-header] [\-\-dump-tag] [\-\-edit\-frame\-byte=P] @@ -70,7 +70,7 @@ check crc and headers for consistency and print several error messages .TP .B \-m \-\-max-errors= -with -e: set maximum number of errors to print per file (0==infinity) +with \-e: set maximum number of errors to print per file (0==infinity) (range=[0..]) .TP .B \-a \-\-anomaly-check @@ -107,17 +107,18 @@ .TP .B \-\-fix-headers fix invalid headers (prevent constant parameter switching), -implies -e, use with care +implies \-e, use with care .TP .B \-\-fix-crc -fix crc (set crc to the calculated one), implies -e, use with +fix crc (set crc to the calculated one), implies \-e, use with care (note: it is not possible to add crc to files which have been created without crc) .TP -\fBdisable error messages for -e --error-check:\fP +\fBdisable error messages for \-e \-\-error\-check:\fP .TP .B \-G \-\-ign-tag128 ignore 128 byte TAG after last frame +.TP .B \-R \-\-ign-resync ignore invalid frame header .TP @@ -145,7 +146,7 @@ .B \-\-show\-valid print the message 'valid audio mpeg stream' for all files which error free (after ignoring errors) .TP -\fBdisable anomaly messages for -a --anomaly-check:\fP +\fBdisable anomaly messages for \-a \-\-anomaly\-check:\fP .TP .B \-C \-\-any-crc ignore crc anomalies debian/patches/01_restore_pristine_code.patch0000644000000000000000000000146712227612341016540 0ustar Author: Sandro Tosi Description: New patch generated from mp3check 0.8.0-5 diff.gz --- mp3check.orig/mp3check.cc +++ mp3check/mp3check.cc @@ -1137,7 +1137,7 @@ // rewrite tag if(have_a_tag) { - if(tag->restore((unsigned char*)p)) { + if(tag->restore((unsigned char*)p )) { fmes(name, "%scut-junk-end: tag successfully restored%s\n", cok, cnor); } else { fmes(name, "%scut-junk-end: unable to restore tag, sorry%s\n", cok, cnor); --- mp3check.orig/tstring.cc +++ mp3check/tstring.cc @@ -716,7 +716,7 @@ void tstring::replaceUnprintable(bool only_ascii) { for(size_t i = 0; i < rep->len; i++) { - unsigned char& c = (unsigned char &)(*rep)[i]; + char& c = (*rep)[i]; if(!isprint(c)) { if(c < ' ') { c = '!'; debian/copyright0000644000000000000000000000250212227612341011120 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: mp3check Upstream-Contact: Johannes Overmann Source: http://code.google.com/p/mp3check/ Files: * Copyright: Copyright (C) 1998-2003,2005,2008-2009,2012 Johannes Overmann License: GPL-2+ Files: debian/* Copyright: Copyright (C) 2008-2012 Sandro Tosi License: GPL-2+ Files: id3tag.* Copyright: Copyright (C) 2000 by Jean Delvare License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian GNU/Linux systems, the complete text of the GNU GPL can be found in the file `/usr/share/common-licenses/GPL-2'. debian/control0000644000000000000000000000153712227612341010577 0ustar Source: mp3check Section: sound Priority: optional Maintainer: Sandro Tosi Build-Depends: debhelper (>= 9) Standards-Version: 3.9.4 Homepage: http://code.google.com/p/mp3check/ Vcs-Git: git://anonscm.debian.org/users/morph/mp3check.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=users/morph/mp3check.git Package: mp3check Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Suggests: mpg321 Description: tool to check mp3 files for consistency Prints several errors and warnings concerning the consistency of mp3 files. Lists stream attributes (color). Layer 1,2,3, mpeg1.0+2.0 are currently supported. CRC check for layer 3. . mp3check is very useful for incomplete mp3 detection as it can be used to scan through your mp3 collection and find all mp3s that aren't perfect. Good for use with many file sharing systems. debian/compat0000644000000000000000000000000212227612341010364 0ustar 9 debian/changelog0000644000000000000000000001426712227612341011052 0ustar mp3check (0.8.7-2) unstable; urgency=low * debian/patches/40_bts726068_remove_truncated_last_frame.patch - fix to prevent segfaults when the last audio frame is truncated; thanks to Xavier Hienne for the report and patch; Closes: #726068, #315497 * debian/control - bump Standards-Version to 3.9.4 (no changes needed) -- Sandro Tosi Thu, 17 Oct 2013 00:36:02 +0200 mp3check (0.8.7-1) unstable; urgency=low * New upstream release * debian/watch - updated to use Google Code * debian/copyright - updated upstream copyright years * debian/patches/{15-bts667288-gcc-4.7.patch, 30_bts624138_manpage_typo.patch} - removed, merged upstream * debian/{control, copyright} - updated upstream website location * debian/{rules, patches/30_hardening.patch} - build using the hardening flags -- Sandro Tosi Sat, 09 Jun 2012 12:02:50 +0200 mp3check (0.8.4-1) unstable; urgency=low * New upstream release * debian/watch - updated * debian/control - added Vcs-{Git, Browser} fields - added ${misc:Depends} to Depends line - bump Standards-Version to 3.9.3 (no changes needed) * Converted to 3.0 (quilt) source format * Converted to debhelper 9 and dh sequencer * debian/copyright - updated to DEP5 and to new upstream release * debian/patches/20_use_destdir_to_install.patch - install using DESTDIR variable * debian/rules - upstream doesn't ship doc anymore - install the manpage (no longer done by upstream Makefile) * debian/patches/15-bts667288-gcc-4.7.patch - fix FTBFS with GCC-4.7 (due to uncoordinated upload by gcc "maintainer"); thanks to Jari Aalto for the patch; Closes: #667288 * debian/patches/30_bts624138_manpage_typo.patch - fix a typo in the manpage; thanks to Reuben Thomas for the report; Closes: #624138 -- Sandro Tosi Sat, 12 May 2012 16:08:03 +0200 mp3check (0.8.3-2) unstable; urgency=low * debian/control - updated my email address - bump Standards-Version to 3.8.1 + added debian/README.source * debian/copyright - added explicit packaging copyright section, adding my contributions - link to versioned GPL-2 license file * debian/patches/*.dpatch - updated my email address * debian/rules - merged 'rm' into dh_clean call -- Sandro Tosi Fri, 22 May 2009 18:47:05 +0200 mp3check (0.8.3-1) unstable; urgency=low * Adopting package (Closes: #465887) * Aknowledge NMU (Closes: #399047, #395451) * New upstream release (Closes: #437399) * debian/control - set myself as maintainer - bump Standards-Version to 3.7.3 - added Homepage field - little changes in short description - removed tailing spaces from long description - added dpatch build-dep * debian/watch - added * debian/rules - removed DH_COMPAT - commented DH_VERBOSE - no longer ignores clean error - removedtemplate header - integrated debian/docs - removed unneeded/commented dh_* calls - added dpatch stuff - updated doc files installation * debian/compat - added * debian/docs - deleted * debian/dirs - deleted * debian/copyright - indented upstream author with 4 spaces - added upstrem author email address - added copyright notices (previous it was used as license) - added a real license note * debian/patches/01_restore_pristine_code.dpatch - added to remove direct upstream code changes - edited for 0.8.3 release * debian/patches/10_bts450532-455727_manpage_fixes.dpatch - added to fix manpage (Closes: #450532, #455727) -- Sandro Tosi Thu, 20 Mar 2008 23:38:42 +0100 mp3check (0.8.0-4.1) unstable; urgency=low * Non-maintainer upload. * Fixed protection of tags id3. Patch by Tobias Frost . (Closes: #399047) * Built with gcc4, updates from libstdc++5 to libstdc++6 (Closes: #395451). * Updated compat to 5. * Bumped standards-version to 3.7.2, no changes required. -- Ana Beatriz Guerrero Lopez Tue, 28 Nov 2006 14:57:12 +0100 mp3check (0.8.0-4) unstable; urgency=low * Apply patch to allow mp3check to compile with gcc 3.4. (Closes: #260651) -- James Morrison Sun, 25 Jul 2004 13:38:13 -0700 mp3check (0.8.0-3) unstable; urgency=low * Don't write based the end of memory. (Closes: #227977) -- James Morrison Tue, 27 Jan 2004 20:15:07 -0500 mp3check (0.8.0-2) unstable; urgency=low * Fix build issues on m68k, alpha and ia64. -- James Morrison Mon, 27 Jan 2003 19:24:27 -0500 mp3check (0.8.0-1) unstable; urgency=low * Acknowledge NMU. (Closes: #143862) * Limit the description lines in debian/control to 80 characters. (Closes: 144750) -- James Morrison Sat, 18 Jan 2003 15:36:44 -0500 mp3check (0.7.3-4.1) unstable; urgency=high * Put the binary back in. Closes: #143862 (NMU; patch in bug report) * s/dh_installmanpages/dh_installman/; so it installs the man page instead of skipping it. -- Joey Hess Sat, 27 Apr 2002 11:57:07 -0400 mp3check (0.7.3-4) unstable; urgency=low * Fix Makefile.in to define CXX and CC. * mp3check.cc: use namespace std and include . (Closes: #143252) -- James Morrison Wed, 17 Apr 2002 09:51:24 -0400 mp3check (0.7.3-3) unstable; urgency=low * Include autoconf in the build dependencies. (Closes: #143090) -- James Morrison Tue, 16 Apr 2002 00:11:41 -0400 mp3check (0.7.3-2) unstable; urgency=low * Run autoconf before the configure script. (Closes: #142931) -- James Morrison Mon, 15 Apr 2002 11:42:58 -0400 mp3check (0.7.3-1) unstable; urgency=low * New upstream version. (Closes: #140676). * New maintainer (Closes: #142840) * Use asprintf instead of vasprintf for exception handling. (Closes: #104982) * Updated upstream download site. -- James Morrison Sun, 14 Apr 2002 09:41:33 -0400 mp3check (0.5.2-1) unstable; urgency=low * Initial Release. * Adjusted Makefile to fix $(DESTDIR) problems. -- Klaus Kettner Sat, 2 Sep 2000 22:26:01 +0200 debian/README.source0000644000000000000000000000023112227612341011341 0ustar This package uses dpatch to handle patches against upstream source code; you can find additional information about dpatch at /usr/share/doc/dpatch/