aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-04-23 09:13:56 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-04-23 09:13:56 +0200
commitdec884d42f7591cb94a6636a304d87c798bdd3fc (patch)
tree4f349181f0d3a0e46b5a1108cea0ccf4de98771f
parent182d08cfe35a30b9b8109b3a4799f3f51e540c55 (diff)
downloadtoolame-dab-dec884d42f7591cb94a6636a304d87c798bdd3fc.tar.gz
toolame-dab-dec884d42f7591cb94a6636a304d87c798bdd3fc.tar.bz2
toolame-dab-dec884d42f7591cb94a6636a304d87c798bdd3fc.zip
vlc_input: also check buffer size
-rw-r--r--vlc_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vlc_input.c b/vlc_input.c
index ab59f53..8233148 100644
--- a/vlc_input.c
+++ b/vlc_input.c
@@ -177,7 +177,7 @@ ssize_t vlc_in_read(void *buf, size_t len)
if (vlc_buffer_totalsize(head_buffer) >= len) {
while (len >= head_buffer->size) {
- if (head_buffer->buf) {
+ if (head_buffer->buf && head_buffer->size) {
// Get all the data from this list element
memcpy(buf, head_buffer->buf, head_buffer->size);