diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 23:41:38 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 23:41:38 +0100 |
commit | ce633965e14cb8ad8a55cdfc3ebbcb3b7e4ccb22 (patch) | |
tree | 4261be40b44e8f26905736c5bb2025c62605dbbd /sbc | |
parent | c004bc8c66d7c1397c732295e5c2f3fa12f5bb2c (diff) |
Don't decode a frame if it is too small
Diffstat (limited to 'sbc')
-rw-r--r-- | sbc/sbc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1196,6 +1196,9 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output, if (written) *written = 0; + if (framelen <= 0) + return framelen; + samples = sbc_synthesize_audio(&priv->dec_state, &priv->frame); ptr = output; |