From: Tristan Matthews Date: Thu, 9 Nov 2017 07:30:14 +0000 (-0500) Subject: vorbis: avoid invalid free X-Git-Tag: v1.3.6~7 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibvorbis.git;a=commitdiff_plain;h=10064bfdd51f7c59aa7724c206aae84b62def5e8 vorbis: avoid invalid free Regression started at commit "4b67376 Remove multiple subtly different inline..." --- diff --git a/lib/info.c b/lib/info.c index 971f004..fe759ed 100644 --- a/lib/info.c +++ b/lib/info.c @@ -647,7 +647,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v, memset(op_code,0,sizeof(*op_code)); if(b){ - oggpack_writeclear(&opb); + if(vi->channels>0)oggpack_writeclear(&opb); if(b->header)_ogg_free(b->header); if(b->header1)_ogg_free(b->header1); if(b->header2)_ogg_free(b->header2);