[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in autoconf-2.64

From: Ralf Wildenhues
Subject: Re: bug in autoconf-2.64
Date: Thu, 24 Feb 2011 07:40:45 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

[ this is http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/7834
  from http://gcc.gnu.org/ml/gcc-patches/2011-02/msg01480.html
  adding bug-gnulib; followups can elide bug-autoconf ]

* Ralf Wildenhues wrote on Thu, Feb 24, 2011 at 07:24:35AM CET:
> IOW, it looks like the replacement code in strstr.c and str-two-way.h
> has a bug (or glibc strchr, which seems rather unlikely).  Besides
> copyright year bumps, these two files have not been updated since in
> gnulib.

Here's a reproducer.  Link with gnulib's strstr.c and it will fail.


#include <string.h>
#include <stdio.h>

int main(void)
  const char* hay = "\n"
  const char *needle = "\n"
  const char* p = strstr (hay, needle);
  printf ("searching for %s in %s\n", needle, hay);
  printf ("found at %d\n", p ?  p - hay : -1);
  return 0;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]