X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=wmadec_filter.c;h=4d384e1ddf9c82c2768712f9a50aaf44af5284f9;hp=a548d04894040bb79b9d8247ad40200b58d917da;hb=03900fe178fa1dc6b371424c8a96f91be52877e2;hpb=f481eaddec671c3783cc098d65be29ea16ee81b1 diff --git a/wmadec_filter.c b/wmadec_filter.c index a548d048..4d384e1d 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -446,14 +446,13 @@ static int wma_decode_init(char *initial_buf, int len, struct private_wmadec_dat struct private_wmadec_data *s; int ret, i; - if (len < 18) - return 0; - PARA_NOTICE_LOG("initial buf: %d bytes\n", len); s = para_calloc(sizeof(*s)); ret = read_asf_header(initial_buf, len, &s->ahi); - if (ret < 0) + if (ret <= 0) { + free(s); return ret; + } s->use_exp_vlc = s->ahi.flags2 & 0x0001; s->use_bit_reservoir = s->ahi.flags2 & 0x0002;