vorbiscomment truncates weird input files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vorbis-tools (Debian) |
Fix Released
|
Unknown
|
|||
vorbis-tools (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Automatically imported from Debian bug report #287170 http://
In Debian Bug tracker #287170, Mario Lang (mlang) wrote : Data loss | #1 |
Debian Bug Importer (debzilla) wrote : | #2 |
Automatically imported from Debian bug report #287170 http://
Debian Bug Importer (debzilla) wrote : | #3 |
Message-Id: <E1Ci8Os-
Date: Sat, 25 Dec 2004 01:39:50 -0800
From: Joshua Kwan <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: vorbiscomment truncates weird input files
Package: vorbis-tools
Version: 1.0.1-1.1
Severity: important
Erroneously, I did this, when I should have been using metaflac:
% for i in *.flac; do printf 'ARTIST=Carlos Santana and Mahavishnu John McLaughlin' | vorbiscomment -w $i; done
Failed to open file as vorbis: Input is not an Ogg bitstream.
Failed to open file as vorbis: Input is not an Ogg bitstream.
Failed to open file as vorbis: Input is not an Ogg bitstream.
Failed to open file as vorbis: Input is not an Ogg bitstream.
Failed to open file as vorbis: Input is not an Ogg bitstream.
Failed to open file as vorbis: Input is not an Ogg bitstream.
Failed to open file as vorbis: Input is not an Ogg bitstream.
but after I did that, each file had been truncated to 0 bytes! I think
vorbiscomment should be a little more lenient...
Thanks,
Josh
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable'), (499, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10
Locale: LANG=en_US.UTF-8, LC_CTYPE=
Versions of packages vorbis-tools depends on:
ii libao2 0.8.5-1 Cross Platform Audio Output Librar
ii libc6 2.3.2.ds1-19 GNU C Library: Shared libraries an
ii libcurl3 7.12.2-2 Multi-protocol file transfer libra
ii libflac4 1.1.0-11 Free Lossless Audio Codec - runtim
ii libidn11 0.5.2-3 GNU libidn library, implementation
ii libogg0 1.1.0-1 Ogg Bitstream Library
ii liboggflac1 1.1.0-11 Free Lossless Audio Codec - runtim
ii libspeex1 1.0.rel.4-1 The Speex Speech Codec
ii libssl0.9.7 0.9.7e-3 SSL shared libraries
ii libvorbis0a 1.0.1-1 The Vorbis General Audio Compressi
ii libvorbisenc2 1.0.1-1 The Vorbis General Audio Compressi
ii libvorbisfile3 1.0.1-1 The Vorbis General Audio Compressi
ii zlib1g 1:1.2.2-4 compression library - runtime
-- no debconf information
Debian Bug Importer (debzilla) wrote : | #4 |
Message-ID: <email address hidden>
Date: Tue, 15 Nov 2005 09:29:09 +0100
From: mlang <email address hidden>
To: <email address hidden>
Subject: Data loss
Severity 287170 grave
thanks.
Justification: Causes data loss
--
CYa,
Mario
In Debian Bug tracker #287170, Bastian Kleineidam (calvin) wrote : | #5 |
Hi,
the reason for the overwrite is the close_files() function in
vcomment.c. It always renames the temporary output file to the given
output file, regardless of previous failures.
I added an error flag and if set only remove the temporary filename.
This fixed the error for me.
Test was exactly like in the report (with a test.1 manpage file):
$ printf 'ARTIST=Carlos Santana and Mahavishnu John McLaughlin' | \
vorbiscomment -w test.1
Regards,
Bastian
--
,''`. Bastian Kleineidam
: :' : GnuPG Schlüssel
`. `' gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
`-
Debian Bug Importer (debzilla) wrote : | #6 |
Message-ID: <20051125184800
Date: Fri, 25 Nov 2005 19:48:00 +0100
From: Bastian Kleineidam <email address hidden>
To: <email address hidden>, <email address hidden>
Subject: Re: vorbiscomment truncates weird input files
--XOIedfhf+7KOe/yw
Content-Type: multipart/mixed; boundary=
Content-
--huq684BweRXVnRxX
Content-Type: text/plain; charset=iso-8859-1
Content-
Content-
Hi,
the reason for the overwrite is the close_files() function in
vcomment.c. It always renames the temporary output file to the given
output file, regardless of previous failures.
I added an error flag and if set only remove the temporary filename.
This fixed the error for me.
Test was exactly like in the report (with a test.1 manpage file):
$ printf 'ARTIST=3DCarlos Santana and Mahavishnu John McLaughlin' | \
vorbiscomment -w test.1
Regards,
Bastian
--=20
,''`. Bastian Kleineidam
: :' : GnuPG Schl=FCssel
`. `' gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
`-
--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-
Content-
--- vorbis-
29 +0100
+++ vorbis-
644 +0100
@@ -58,7 +58,7 @@
void free_param(param_t *param);
void parse_options(int argc, char *argv[], param_t *param);
void open_files(param_t *p);
-void close_files(param_t *p);
+void close_files(param_t *p, int err);
=20
=20
/**********
@@ -102,7 +102,7 @@
{
fprintf(stderr, _("Failed to open file as vorbis: %s\n"),=20
vcedit_
- close_files(param);
+ close_files(param, 1);
return 1;
@@ -115,7 +115,7 @@
/* done */
vcedit_
=20
- close_files(param);
+ close_files(param, 0);
return 0; =09
}
@@ -128,7 +128,7 @@
{
fprintf(stderr, _("Failed to open file as vorbis: %s\n"),=20
vcedit_
- close_files(param);
+ close_files(param, 1);
return 1;
@@ -169,7 +169,7 @@
{
fprintf(stderr, _("Failed to write comments to output file: %s\n"),=20
vcedit_
- close_files(param);
+ close_files(param, 1);
return 1;
@@ -178,7 +178,7 @@
/* done */
vcedit_
=09
- close_files(param);
+ close_files(param, 0);
return 0;
}
@@ -453,7 +453,6 @@
void open_files(param_t *p)
{
/* for all modes, open the input file */
-
if (strncmp(
p->in =3D stdin;
} else {
@@ -529,7 +528,7 @@
=20
***********/
=20
-void close_files(param_t *p)
+void close_files(param_t *p, int err)
{
if (p->in !=3D NULL && p->in !=3D stdin) fclose(p->in);
if (p->out...
In Debian Bug tracker #287170, Dato Simó (dato) wrote : Bug#287170: fixed in vorbis-tools 1.1.1-1 | #7 |
Source: vorbis-tools
Source-Version: 1.1.1-1
We believe that the bug you reported is fixed in the latest version of
vorbis-tools, which is due to be installed in the Debian FTP archive:
vorbis-
to pool/main/
vorbis-
to pool/main/
vorbis-
to pool/main/
vorbis-
to pool/main/
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Adeodato Simó <email address hidden> (supplier of updated vorbis-tools package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Wed, 07 Dec 2005 06:21:02 +0100
Source: vorbis-tools
Binary: vorbis-tools
Architecture: i386 source
Version: 1.1.1-1
Distribution: unstable
Urgency: low
Maintainer: Christopher L Cheney <email address hidden>
Changed-By: Adeodato Simó <email address hidden>
Description:
vorbis-tools - several Ogg Vorbis tools
Closes: 287170 339846
Changes:
vorbis-tools (1.1.1-1) unstable; urgency=low
.
* New upstream release packaged (closes: #339846).
.
* Pull patch from upstream to prevent vorbiscomment from clobbering files
when an error happens. (Closes: #287170)
[File: upstream_
.
* Add myself as an uploader, as agreed with Christopher in the past;
note it in debian/copyright.
.
* Update debian/control:
.
+ drop unnecessary build-dependencies on bison and devscripts.
+ build-depend on libcurl3-gnutls-dev instead of libcurl3-dev | libcurl-dev
+ drop version restriction on all build-dependencies, since they'd be all
satisfied with stable.
.
* Overhaul debian/rules.
.
* Make use of debian/patches, putting in separate files the patches applied
in previous NMUs (deactivated some of them because they no longer apply
and/or are incomplete, until I figure out what to do with them; reopens:
#272037, #264365).
.
* Update download URL in debian/copyright.
.
* Bumped Standards-Version to 3.6.2 (no changes required).
Files:
5095069b187e04
6b4c7fea98b2cd
8b57fe3b77602f
c6b7c4703a1430
-----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkO
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Signed by Adeodato Simó <email address hidden>
Debian Bug Importer (debzilla) wrote : | #8 |
Message-Id: <email address hidden>
Date: Tue, 06 Dec 2005 21:47:06 -0800
From: =?utf-8?
To: <email address hidden>
Subject: Bug#287170: fixed in vorbis-tools 1.1.1-1
Source: vorbis-tools
Source-Version: 1.1.1-1
We believe that the bug you reported is fixed in the latest version of
vorbis-tools, which is due to be installed in the Debian FTP archive:
vorbis-
to pool/main/
vorbis-
to pool/main/
vorbis-
to pool/main/
vorbis-
to pool/main/
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Adeodato Simó <email address hidden> (supplier of updated vorbis-tools package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Wed, 07 Dec 2005 06:21:02 +0100
Source: vorbis-tools
Binary: vorbis-tools
Architecture: i386 source
Version: 1.1.1-1
Distribution: unstable
Urgency: low
Maintainer: Christopher L Cheney <email address hidden>
Changed-By: Adeodato Simó <email address hidden>
Description:
vorbis-tools - several Ogg Vorbis tools
Closes: 287170 339846
Changes:
vorbis-tools (1.1.1-1) unstable; urgency=low
.
* New upstream release packaged (closes: #339846).
.
* Pull patch from upstream to prevent vorbiscomment from clobbering files
when an error happens. (Closes: #287170)
[File: upstream_
.
* Add myself as an uploader, as agreed with Christopher in the past;
note it in debian/copyright.
.
* Update debian/control:
.
+ drop unnecessary build-dependencies on bison and devscripts.
+ build-depend on libcurl3-gnutls-dev instead of libcurl3-dev | libcurl-dev
+ drop version restriction on all build-dependencies, since they'd be all
satisfied with stable.
.
* Overhaul debian/rules.
.
* Make use of debian/patches, putting in separate files the patches applied
in previous NMUs (deactivated some of them because they no longer apply
and/or are incomplete, until I figure out what to do with them; reopens:
#272037, #264365).
.
* Update download URL in debian/copyright.
.
* Bumped Standards-Version to 3.6.2 (no changes required).
Files:
5095069b187e04
6b4c7fea98b2cd
8b57fe3b77602f
c6b7c4703a1430
Matt Zimmerman (mdz) wrote : | #9 |
Fixed in 1.1.1-1 and later:
vorbis-tools | 1.1.1-3 | http://
Changed in vorbis-tools: | |
status: | Unconfirmed → Fix Released |
Severity 287170 grave
thanks.
Justification: Causes data loss
--
CYa,
Mario