Date: Mon, 3 Jan 2011 19:53:20 GMT From: Olivier <bugs-freebsd@interfasys.co.uk> To: freebsd-gnats-submit@FreeBSD.org Subject: amd64/153659: awk segfaults when trying to extract a combination of special characters Message-ID: <201101031953.p03JrK1w023972@red.freebsd.org> Resent-Message-ID: <201101032000.p03K0TlI026189@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101031953.p03JrK1w023972>