Reported by Tim Rühsen in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
* m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Use NULL + 1, not NULL.
+2020-05-21 Bruno Haible <bruno@clisp.org>
+
+ memmem: Avoid wrong configure results with "clang -fsanitize=undefined".
+ Reported by Tim Rühsen in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00207.html>.
+ * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): Use NULL + 1, not NULL.
+
2020-05-21 Bruno Haible <bruno@clisp.org>
regex: Avoid wrong configure results with "clang -fsanitize=leak".
-# memmem.m4 serial 26
+# memmem.m4 serial 27
dnl Copyright (C) 2002-2004, 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
/* Check for empty needle behavior. */
{
const char *haystack = "AAA";
- if (memmem (haystack, 3, NULL, 0) != haystack)
+ if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
result |= 2;
}
return result;