bin/84740: regcomp("\254") fails

Peter Jeremy peterjeremy at optushome.com.au
Wed Aug 10 10:30:20 GMT 2005


>Number:         84740
>Category:       bin
>Synopsis:       regcomp("\254") fails
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 10 10:30:18 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Peter Jeremy
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
n/a
>Environment:
System: FreeBSD server.vk2pj.dyndns.org 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Mon Aug 8 18:22:06 EST 2005 root at server.vk2pj.dyndns.org:/home/obj/k7/usr/src/sys/server i386

>Description:
	regcomp(3) fails to compile the string "\376" as an extended RE
	(but does handle it as a BRE) and reports "empty (sub)expression".
	This works correctly on 4.9 but fails on 5.3 and a recent -CURRENT.

>How-To-Repeat:

#include <sys/types.h>
#include <regex.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char **argv)
{
    char	buf[1024];
    int		r;
    regex_t	rx;

    r = regcomp(&rx, "\376", REG_EXTENDED);
    if (r != 0) {
	regerror(r, &rx, buf, sizeof(buf));
	printf("%s\n", buf);
    }
    exit(0);
}

>Fix:
	Unknown
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list