ref: 4c37e8749e7abfb79b8035e6588d3f50fe8c8984
parent: 40bdc14d29bf86be7174fa7d36f75217cf44d423
author: Paul Brossier <piem@piem.org>
date: Mon Dec 17 10:10:07 EST 2018
[io] sink_vorbis: prevent crash on null path
--- a/src/io/sink_vorbis.c
+++ b/src/io/sink_vorbis.c
@@ -66,6 +66,11 @@
{
aubio_sink_vorbis_t * s = AUBIO_NEW(aubio_sink_vorbis_t);
+ if (!uri) {
+ AUBIO_ERROR("sink_apple_audio: Aborted opening null path\n");
+ goto failure;
+ }
+
s->path = AUBIO_ARRAY(char_t, strnlen(uri, PATH_MAX) + 1);
strncpy(s->path, uri, strnlen(uri, PATH_MAX) + 1);
s->path[strnlen(uri, PATH_MAX)] = '\0';