Don't try to init the decoder if less than WMA_FRAME_SKIP bytes are available.
[paraslash.git] / wmadec_filter.c
index ca5e22a40ccfd1bd00f564d51113981d0efa1106..35e2703c1f796c390ce8386d764adb4a9395bff5 100644 (file)
@@ -1250,6 +1250,8 @@ static ssize_t wmadec_convert(char *inbuffer, size_t len,
 
        if (out_size < 128 * 1024)
                return 0;
+       if (len <= WMA_FRAME_SKIP)
+               return 0;
        if (!pwd) {
                ret = wma_decode_init(inbuffer, len, &pwd);
                if (ret <= 0)