From 79d70f124d1116cf5c3a39b64a63a9dd81c224c1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Nov 2008 20:16:56 +0100 Subject: output: don't allow length==0 Nobody should call playAudio() with an empty chunk. Add some assertions on that. --- src/audio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/audio.c') diff --git a/src/audio.c b/src/audio.c index 953b1a54e..5fb8ab0b9 100644 --- a/src/audio.c +++ b/src/audio.c @@ -228,6 +228,7 @@ bool playAudio(const char *buffer, size_t length) bool ret = false; unsigned int i; + assert(length > 0); /* no partial frames allowed */ assert((length % audio_format_frame_size(&input_audio_format)) == 0); -- cgit v1.2.3