🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Nico Josuttis Mon, 16 Nov 1992 15:32
REGEX: fatal BUG in regex.c
#1104
Author: 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
--------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads