GNU bug report logs - #19061
[PATCH] dfa: building superset, access to unallocated memory

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Sat, 15 Nov 2014 09:13:01 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 19061 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Jim Meyering <jim <at> meyering.net>
Cc: 19061 <19061 <at> debbugs.gnu.org>
Subject: Re: bug#19061: [PATCH] dfa: building superset,
 access to unallocated memory
Date: Sun, 16 Nov 2014 18:18:04 +0900
On Sat, 15 Nov 2014 22:27:50 -0800
Jim Meyering <jim <at> meyering.net> wrote:
> Thanks for confirming.
> In that case, since I see no harm in calling xnmalloc with N = 0, I
> will use a more conservative change: guard only the undefined use of
> memcpy.
> I've left your name on this amended patch.

Thanks for the ajustment.  You are right, but the purpose of the code
is to make a clone of original DFA.  If we do not guard xnmalloc, when
calloc is 0, charclasses is NULL in original DFA, and it is *NOT* NULL
in the superset.  I think that it is not right logically.





This bug report was last modified 10 years and 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.