From 25a5f1f25939f4805077e5e74aa228c372af9abe Mon Sep 17 00:00:00 2001 From: InHong Han Date: Mon, 3 Sep 2018 19:41:48 +0900 Subject: [PATCH] Prevent integer underflow issue An integer underflow may occur due to arithmetic operation (unsigned subtraction) between variable 'lendir' and value '1', when 'lendir' is equal to '0' Change-Id: I569ff1e74e5e923573055c345752d0f343bba529 --- ism/src/ltdl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ism/src/ltdl.cpp b/ism/src/ltdl.cpp index 6223c93..5aecd6c 100644 --- a/ism/src/ltdl.cpp +++ b/ism/src/ltdl.cpp @@ -2630,6 +2630,7 @@ foreach_dirinpath ( goto cleanup; } + assert ((int)lendir > 0); assert (filenamesize > (int)lendir); strncpy (filename, dir_name, filenamesize); -- 2.7.4