Fix potential buffer overrun
authorDmitry-Me <wipedout@yandex.ru>
Thu, 4 Feb 2016 07:11:26 +0000 (10:11 +0300)
committerRich Salz <rsalz@openssl.org>
Thu, 4 Feb 2016 15:09:19 +0000 (10:09 -0500)
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
crypto/dso/dso_dl.c

index 2b56e9e..6407bf7 100644 (file)
@@ -265,7 +265,7 @@ static char *dl_merger(DSO *dso, const char *filespec1, const char *filespec2)
         spec2len = (filespec2 ? strlen(filespec2) : 0);
         len = spec2len + (filespec1 ? strlen(filespec1) : 0);
 
-        if (filespec2 && filespec2[spec2len - 1] == '/') {
+        if (spec2len && filespec2[spec2len - 1] == '/') {
             spec2len--;
             len--;
         }