On Sat, Aug 18, 2007 at 10:46:16PM +0200, k.nowosad wrote: > Author: k.nowosad > Date: Sat Aug 18 22:46:16 2007 > New Revision: 977 > > Log: > added missing malloc checks > > > Modified: > jpeg2000/j2kdec.c > > Modified: jpeg2000/j2kdec.c > ============================================================================== > --- jpeg2000/j2kdec.c (original) > +++ jpeg2000/j2kdec.c Sat Aug 18 22:46:16 2007 > @@ -318,10 +318,15 @@ static int get_siz(J2kDecoderContext *s) > s->numYtiles = ff_j2k_ceildiv(s->Ysiz - s->YT0siz, s->YTsiz); > > s->tile = av_mallocz(s->numXtiles * s->numYtiles * sizeof(J2kTile)); > + if (!s->tile) > + return -1;
ideally these should be AVERROR(ENOMEM) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable
signature.asc
Description: Digital signature
_______________________________________________ FFmpeg-soc mailing list [email protected] http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
