This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix BZ 18036 buffer overflow (read past end of buffer) in internal_fnmatch=>end_pattern


On 02/28/2015 06:25 AM, Paul Pluzhnikov wrote:
>      else if ((*p == L('?') || *p == L('*') || *p == L('+') || *p == L('@')
>  	      || *p == L('!')) && p[1] == L('('))
> -      p = END (p + 1);
> +      {
> +	p = END (p + 1);
> +	if (*p == L('\0'))
> +	  /* This is an invalid pattern.  */
> +	  return pattern;
> +      }

Okay to commit if you have checked that the test case actually tests the
bug.  Thanks.

-- 
Florian Weimer / Red Hat Product Security


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]