7 Sep
2017
7 Sep
'17
4:35 p.m.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/include/reef/audio/buffer.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/include/reef/audio/buffer.h b/src/include/reef/audio/buffer.h index e708ee2..ea9bd9c 100644 --- a/src/include/reef/audio/buffer.h +++ b/src/include/reef/audio/buffer.h @@ -183,6 +183,8 @@ static inline int buffer_set_size(struct comp_buffer *buffer, uint32_t size) { if (size > buffer->alloc_size) return -ENOMEM; + if (size == 0) + return -EINVAL;
buffer->end_addr = buffer->addr + size; buffer->size = size;
--
2.11.0