Fix CVE-2016-1531
[exim.git] / src / src / string.c
index c0dfd04b6de31852b986e5e024b9d57f8b28827b..1c4ba121ce2a812ab6c1f7f09aeec213e176003c 100644 (file)
@@ -1707,6 +1707,17 @@ return yield;
 #endif  /* COMPILE_UTILITY */
 
 
+#ifndef COMPILE_UTILITY
+/* qsort(3), currently used to sort the environment variables
+for -bP environment output, needs a function to compare two pointers to string
+pointers. Here it is. */
+
+int
+string_compare_by_pointer(const uschar **a, const uschar **b)
+{
+return Ustrcmp(CUS *a, CUS *b);
+}
+#endif /* COMPILE_UTILITY */