From: Paul Brossier Date: Sun, 16 Dec 2018 18:39:28 +0000 (+0100) Subject: [io] prevent possible crash on empty string in source_apple_audio X-Git-Tag: 0.4.9~91 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=e9572462f613c7c552cf0d8e9c02e3a037e46272 [io] prevent possible crash on empty string in source_apple_audio --- diff --git a/src/io/source_apple_audio.c b/src/io/source_apple_audio.c index 6b26b436..d8b33af6 100644 --- a/src/io/source_apple_audio.c +++ b/src/io/source_apple_audio.c @@ -59,7 +59,7 @@ aubio_source_apple_audio_t * new_aubio_source_apple_audio(const char_t * path, u { aubio_source_apple_audio_t * s = AUBIO_NEW(aubio_source_apple_audio_t); - if (path == NULL) { + if (path == NULL || strnlen(path, PATH_MAX) < 1) { AUBIO_ERROR("source_apple_audio: Aborted opening null path\n"); goto beach; }