* missing error checking when encoding vorbis @ 2017-11-20 17:12 Jaromír Mikeš [not found] ` <20171120171406.ym4kl47dtedxae2m@bogon.m.sigxcpu.org> 0 siblings, 1 reply; 3+ messages in thread From: Jaromír Mikeš @ 2017-11-20 17:12 UTC (permalink / raw) To: sox-devel, Måns Rullgård, Eric Wong [-- Attachment #1.1: Type: text/plain, Size: 162 bytes --] Hi, can you check please attached patch in debian bug report? https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882236 Can this be applied best regards mira [-- Attachment #1.2: Type: text/html, Size: 632 bytes --] [-- Attachment #2: Type: text/plain, Size: 202 bytes --] ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot [-- Attachment #3: Type: text/plain, Size: 158 bytes --] _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20171120171406.ym4kl47dtedxae2m@bogon.m.sigxcpu.org>]
* Re: missing error checking when encoding vorbis [not found] ` <20171120171406.ym4kl47dtedxae2m@bogon.m.sigxcpu.org> @ 2017-11-20 17:42 ` Måns Rullgård 2017-11-20 19:03 ` Jaromír Mikeš 0 siblings, 1 reply; 3+ messages in thread From: Måns Rullgård @ 2017-11-20 17:42 UTC (permalink / raw) To: Guido Günther; +Cc: Eric Wong, sox-devel [-- Attachment #1: Type: text/plain, Size: 502 bytes --] Guido Günther <agx@sigxcpu.org> writes: > Hi, > On Mon, Nov 20, 2017 at 06:12:17PM +0100, Jaromír Mikeš wrote: >> Hi, >> >> can you check please attached patch in debian bug report? >> >> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882236 > > The direct link to the patch is > > https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=882236;filename=0001-Handle-vorbis_analysis_headerout-errors.patch;msg=19 Patch attached for reference. Looks reasonable to me. -- Måns Rullgård [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Handle-vorbis_analysis_headerout-errors.patch --] [-- Type: text/x-diff, Size: 1575 bytes --] From 93b6e4b5b0efa47b318151d39c35277fc06525f1 Mon Sep 17 00:00:00 2001 Message-Id: <93b6e4b5b0efa47b318151d39c35277fc06525f1.1511192342.git.agx@sigxcpu.org> From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> Date: Wed, 15 Nov 2017 18:36:58 +0100 Subject: [PATCH] Handle vorbis_analysis_headerout errors This is related to https://github.com/xiph/vorbis/pull/34 but could also happen today with on other errors in the called function. --- src/vorbis.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vorbis.c b/src/vorbis.c index 267fb803..1afaa01b 100644 --- a/src/vorbis.c +++ b/src/vorbis.c @@ -270,8 +270,11 @@ static int write_vorbis_header(sox_format_t * ft, vorbis_enc_t * ve) vc.comment_lengths[i] = strlen(text); } } - vorbis_analysis_headerout( /* Build the packets */ - &ve->vd, &vc, &header_main, &header_comments, &header_codebooks); + if (vorbis_analysis_headerout( /* Build the packets */ + &ve->vd, &vc, &header_main, &header_comments, &header_codebooks) < 0) { + ret = HEADER_ERROR; + goto cleanup; + } ogg_stream_packetin(&ve->os, &header_main); /* And stream them out */ ogg_stream_packetin(&ve->os, &header_comments); @@ -280,6 +283,7 @@ static int write_vorbis_header(sox_format_t * ft, vorbis_enc_t * ve) while (ogg_stream_flush(&ve->os, &ve->og) && ret == HEADER_OK) if (!oe_write_page(&ve->og, ft)) ret = HEADER_ERROR; +cleanup: for (i = 0; i < vc.comments; ++i) free(vc.user_comments[i]); free(vc.user_comments); -- 2.15.0 [-- Attachment #3: Type: text/plain, Size: 202 bytes --] ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot [-- Attachment #4: Type: text/plain, Size: 158 bytes --] _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: missing error checking when encoding vorbis 2017-11-20 17:42 ` Måns Rullgård @ 2017-11-20 19:03 ` Jaromír Mikeš 0 siblings, 0 replies; 3+ messages in thread From: Jaromír Mikeš @ 2017-11-20 19:03 UTC (permalink / raw) To: sox-devel; +Cc: Eric Wong, Guido Günther [-- Attachment #1.1: Type: text/plain, Size: 676 bytes --] 2017-11-20 18:42 GMT+01:00 Måns Rullgård <mans@mansr.com>: > Guido Günther <agx@sigxcpu.org> writes: > > > Hi, > > On Mon, Nov 20, 2017 at 06:12:17PM +0100, Jaromír Mikeš wrote: > >> Hi, > >> > >> can you check please attached patch in debian bug report? > >> > >> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882236 > > > > The direct link to the patch is > > > > https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug= > 882236;filename=0001-Handle-vorbis_analysis_headerout-errors.patch;msg=19 > > Patch attached for reference. Looks reasonable to me. > Ok ... thank you for confirmation ... I applied it in debian repo mira [-- Attachment #1.2: Type: text/html, Size: 1654 bytes --] [-- Attachment #2: Type: text/plain, Size: 202 bytes --] ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot [-- Attachment #3: Type: text/plain, Size: 158 bytes --] _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-20 19:03 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-11-20 17:12 missing error checking when encoding vorbis Jaromír Mikeš [not found] ` <20171120171406.ym4kl47dtedxae2m@bogon.m.sigxcpu.org> 2017-11-20 17:42 ` Måns Rullgård 2017-11-20 19:03 ` Jaromír Mikeš
Code repositories for project(s) associated with this public inbox https://80x24.org/mirrors/sox.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).