From 7852719f0a4cae043f7a6c13787d0aa0310c1721 Mon Sep 17 00:00:00 2001 From: Seungbae Shin Date: Mon, 13 Jan 2020 19:21:58 +0900 Subject: [PATCH] fixup! Fix some vulnerability (Null Pointer Dereference) defects Change-Id: Ic82ab59660ba7976789b06bc8da6c61ba5317d21 --- testsuite/mm_sound_testsuite_simple.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testsuite/mm_sound_testsuite_simple.c b/testsuite/mm_sound_testsuite_simple.c index 4bfc7fb..f72e2fd 100755 --- a/testsuite/mm_sound_testsuite_simple.c +++ b/testsuite/mm_sound_testsuite_simple.c @@ -803,6 +803,11 @@ static void interpret(char *cmd) if (basedir != NULL) { entry_len = offsetof(struct dirent, d_name) + fpathconf(dirfd(basedir), MAX_STRING_LEN) + 1; prev_entry = malloc(entry_len); + if (prev_entry == NULL) { + debug_error("malloc error"); + closedir(basedir); + break; + } while (1) { int playfail = 0; -- 2.7.4