aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index 08e6b1956..0aca4da95 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -106,6 +106,9 @@ size_t decoder_read(struct decoder *decoder,
assert(is != NULL);
assert(buffer != NULL);
+ if (length == 0)
+ return 0;
+
while (true) {
/* XXX don't allow decoder==NULL */
if (decoder != NULL &&