Browse code

pcre: added warnings in regard to CVE-2015-3210

Kevin Lin authored on 2015/06/06 00:11:35
Showing 1 changed files
... ...
@@ -57,14 +57,29 @@ PCRE_LIBS=""
57 57
 if test "x$PCRE_HOME" != "x"; then
58 58
   AC_MSG_CHECKING([pcre-config version])
59 59
   PCRECONF_VERSION="`$PCRE_HOME/bin/pcre-config --version`"
60
-  if test "x%PCRECONF_VERSION" != "x"; then
61
-    AC_MSG_RESULT([$PCRECONF_VERSION])
62
-    found_pcre="yes"
63
-    PCRE_CPPFLAGS="`$PCRE_HOME/bin/pcre-config --cflags`"
64
-    PCRE_LIBS="`$PCRE_HOME/bin/pcre-config --libs`"
65
-  else
60
+
61
+  if test "x$PCRECONF_VERSION" == "x"; then
66 62
     AC_MSG_ERROR([pcre-config failed])
67 63
   fi
64
+
65
+  AC_MSG_RESULT([$PCRECONF_VERSION])
66
+  AC_MSG_CHECKING([for CVE-2015-3210])
67
+  pcrever_major=`echo "$PCRECONF_VERSION" | sed -e 's/\([[0-9]]\).*/\1/'`
68
+  pcrever_minor=`echo "$PCRECONF_VERSION" | sed -e 's/[[0-9]]\.\(.*\)/\1/'`
69
+  if test $pcrever_major -eq 8; then
70
+    if test $pcrever_minor -gt 33 && test $pcrever_minor -lt 38; then
71
+       AC_MSG_RESULT([yes])
72
+       AC_MSG_WARN([The installed pcre version may contain a security bug. Please upgrade to 8.38 or later: http://www.pcre.org.])
73
+    else
74
+       AC_MSG_RESULT([ok])
75
+    fi
76
+  else
77
+    AC_MSG_RESULT([ok]);
78
+  fi
79
+  found_pcre="yes"
80
+  PCRE_CPPFLAGS="`$PCRE_HOME/bin/pcre-config --cflags`"
81
+  PCRE_LIBS="`$PCRE_HOME/bin/pcre-config --libs`"
82
+  
68 83
 fi
69 84
 
70 85
 have_pcre="no"