projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f47ca5
)
wmadec: Set data size to 0 if nothing was decoded.
author
Andre Noll
<maan@tuebingen.mpg.de>
Thu, 8 Dec 2016 20:32:32 +0000
(21:32 +0100)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Sun, 11 Dec 2016 12:13:33 +0000
(13:13 +0100)
Without this, we might feed uninitialized data into the output stream.
wmadec_filter.c
patch
|
blob
|
history
diff --git
a/wmadec_filter.c
b/wmadec_filter.c
index f695d869806fef2223e4c70dbd41040e1d404d12..41dd51f96bb7fa49522a2749256802d45fa60de3 100644
(file)
--- a/
wmadec_filter.c
+++ b/
wmadec_filter.c
@@
-1068,10
+1068,13
@@
static int wma_decode_superframe(struct private_wmadec_data *pwd, void *data,
if (buf_size == 0) {
pwd->last_superframe_len = 0;
+ *data_size = 0;
return 0;
}
- if (buf_size < pwd->ahi.block_align)
+ if (buf_size < pwd->ahi.block_align) {
+ *data_size = 0;
return 0;
+ }
buf_size = pwd->ahi.block_align;
samples = data;
init_get_bits(&pwd->gb, buf, buf_size);