amd64/153659: awk segfaults when trying to extract a combination of
special characters
Olivier
bugs-freebsd at interfasys.co.uk
Mon Jan 3 20:00:29 UTC 2011
>Number: 153659
>Category: amd64
>Synopsis: awk segfaults when trying to extract a combination of special characters
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-amd64
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 03 20:00:29 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Olivier
>Release: 8.1
>Organization:
interfaSys Ltd
>Environment:
FreeBSD 8.1-STABLE FreeBSD 8.1-STABLE #0 r213396 amd64
>Description:
awk seg faults when it has to deal with at least one sequence of characters.
This makes it crash: %*
I don't know if it happens with other combinations
>How-To-Repeat:
# edit conf
Type this
GPG_PW='%*'
# edit awk_test.sh
Type this
awk '/^[ \t]*GPG_PW[ \t=]/{\
sub(/^[ \t]*GPG_PW[ \t]*=*/,"",$0);\
gsub(/^[ \t]*[\047"]|[\047"][ \t]*$/,"",$0);\
printf $0; exit}' "$1"
Now try to extract GPG_PW
# ./awk_test.sh conf
You will get this:
./awk_test.sh: line 4: 18676 Segmentation fault: 11 (core dumped) awk '/^[ \t]*GPG_PW[ \t=]/{\
sub(/^[ \t]*GPG_PW[ \t]*=*/,"",$0);\
gsub(/^[ \t]*[\047"]|[\047"][ \t]*$/,"",$0);\
printf $0; exit}' "$1"
>Fix:
I'm not aware of any fixes
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-amd64
mailing list