ports/100780: net-mgmt/netmond: restore correct regexp matching

Valentin Nechayev netch at lucky.net
Mon Jul 24 16:50:50 UTC 2006


>Number:         100780
>Category:       ports
>Synopsis:       net-mgmt/netmond: restore correct regexp matching
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 24 16:50:20 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Valentin Nechayev
>Release:        FreeBSD 6.1-RC i386
>Organization:
Lucky Net Ltd.
>Environment:
System: FreeBSD greyla.carrier.kiev.ua 6.1-RC FreeBSD 6.1-RC #0: Thu Apr 27 18:56:46 EEST 2006 root at saiga.carrier.kiev.ua:/usr/BSD/obj/usr/BSD/src/sys/saiga i386

>Description:

patch-AA from port patches contains uncompleted 8bitization patch which
changes size of bit table for character class in real but doesn't change
its declaration. As result, regexp matching works unstable.

>How-To-Repeat:

E.g. for string "23.203", "^[0-9]" matches; "[0-9]*" doesn't;
"^([0-9][0-9.]*)" matches again. There are another examples of unstable work
but code is more eloquent.

>Fix:

Apply the following patch to the port:

diff -rNu 0/usr/ports/net-mgmt/netmond/files/patch-AA 1/usr/ports/net-mgmt/netmond/files/patch-AA
--- 0/usr/ports/net-mgmt/netmond/files/patch-AA	Wed Aug 18 20:08:08 2004
+++ 1/usr/ports/net-mgmt/netmond/files/patch-AA	Mon Jul 24 19:34:44 2006
@@ -1130,4 +1130,13 @@
 +#define inascii(x)	(0255&(x))
  #define iswordc(x) 	chrtyp[inascii(x)]
  #define isinset(x, y) 	((x)[((y)&BLKIND)>>3] & (1<<((y)&BITIND)))
+
+@@ -596,7 +596,7 @@
  
+ #define ANYSKIP	2 	/* CLO ANY END ...	   */
+ #define CHRSKIP	3	/* CLO CHR chr END ...	   */
+-#define CCLSKIP 18	/* CLO CCL 16bytes END ... */
++#define CCLSKIP BITBLK+2	/* CLO CCL 32bytes END ... */
+ 
+ static char *
+ pmatch(prog, lp, ap)

or separate change of CCLSKIP to another patch.

Credits to: Vsevolod Volkov
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list