Re: [PATCH] Fix possible segmentation fault in strnstr() on 64-bit systems

2017-09-13 Thread Yaakov Selkowitz
On 2017-09-13 10:44, Johannes Schindelin wrote: > As of f22054c94d (Modify strnstr.c., 2017-08-30), the strnstr() > implementation was replaced by a version that segfaults (at least > sometimes) on 64-bit systems. > > The reason: the new implementation uses memmem(), and the prototype of > memmem(

[PATCH] Fix possible segmentation fault in strnstr() on 64-bit systems

2017-09-13 Thread Johannes Schindelin
As of f22054c94d (Modify strnstr.c., 2017-08-30), the strnstr() implementation was replaced by a version that segfaults (at least sometimes) on 64-bit systems. The reason: the new implementation uses memmem(), and the prototype of memmem() is missing because the _GNU_SOURCE constant is not defined