[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] dfa: don't overrun a malloc'd buffer for certain regexps
From: |
Jim Meyering |
Subject: |
Re: [PATCH] dfa: don't overrun a malloc'd buffer for certain regexps |
Date: |
Tue, 21 Jun 2011 09:00:19 +0200 |
Jim Meyering wrote:
...
> Thanks.
>
> I've added the fixes in dfasearch.c and pcresearch.c and put your name on it.
> Let me know if you'd like to change anything before I push it.
...
> Subject: [PATCH] dfa: avoid possibility of overflow
>
> * src/dfa.c (REALLOC_IF_NECESSARY, CALLOC, MALLOC, REALLOC):
> Use functions from xalloc.h to avoid overflow.
> * src/dfasearch.c (GEAcompile): Use xnrealloc rather than realloc.
> * src/pcresearch.c (Pcompile): Use xnmalloc, not xmalloc.
> ---
> src/dfa.c | 23 ++++++++++++-----------
> src/dfasearch.c | 4 +---
> src/pcresearch.c | 2 +-
> 3 files changed, 14 insertions(+), 15 deletions(-)
Paul ACK'd that privately, so I've pushed it.