🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1104

REGEX: fatal BUG in regex.c

#1104
From: Nico Josuttis
Date: Mon, 16 Nov 1992 15:32
36 lines
1394 bytes
Hi folks,
i found a fatal bug using ranges and translate tables
(regex 0.11).

Scenario:
  Pattern: [A-A]
  String:  A
  => OK, (match value: 1)

  BUT: Pattern: [a-a]
       String:  a
       => ERROR, NO MATCH

That happens when i use the translate table "upcase".

IMHO the bug is the following:
In regex.c in compile_range() in line 2181:
	PATFETCH (range_end);
must be
	PATFETCH_RAW (range_end);
because otherwise a translated char gets compared with
a non translated char.
In my example this processes the range [a-A], which is empty.

Hope this helps.

BTW, is there a list with any other open bugs ?

--------
Nico
                                 address: BREDEX GmbH
email:   nico@bredex.de                   Nicolai Josuttis
                                          Kastanienallee 2a 
phone:   +49 531 75480                    D-3300 Braunschweig
fax:     +49 531 796358                   Germany
--------
Technical Details
Message-ID: <9211161332.AA11874@bredex.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bredex.DE!nico

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bredex.DE!nico
From: nico@bredex.DE (Nico Josuttis)
Subject: REGEX: fatal BUG in regex.c
Message-ID: <9211161332.AA11874@bredex.de>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 16 Nov 1992 15:32:03 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 37