Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
#! /usr/bin/crm |
| 2 |
# |
| 3 |
# paolo_ov2.crm - paolo test script for MIME messages |
| 4 |
|
| 5 |
# Copyright 2009 William S. Yerazunis. |
| 6 |
# This file is under GPLv3, as described in COPYING. |
| 7 |
|
| 8 |
#On Fri, Aug 26, 2005 at 03:14:54PM +0200, Hilko Bengen wrote: |
| 9 |
#> I am running Debian/unstable on an x86 box with version |
| 10 |
#> 20050721-BlameNeilArmstrong and have encountered a segmentation fault |
| 11 |
#> while working on some code that digests MIME messages. I have also |
| 12 |
#> reproduced the problem with 20050415.BlameTheIRS installed on a |
| 13 |
#> Debian/sarge box. |
| 14 |
#> |
| 15 |
#> The script (with part of a spam mail included into the code) is |
| 16 |
#> attached at the end of the message. |
| 17 |
#> |
| 18 |
#> crm114 apparently only crashes if :headers: is ISOLATEd between the |
| 19 |
#> first and the second MATCH and if :headers: is then re-used as a |
| 20 |
#> target in the last MATCH. |
| 21 |
#> |
| 22 |
#> Cheers, |
| 23 |
#> -Hilko |
| 24 |
#> |
| 25 |
|
| 26 |
window |
| 27 |
alter (:_dw:) /Return-path: <[email protected]>\nEnvelope-to: [email protected]\nDelivery-date: Mon, 08 Aug 2005 12:09:51 +0200\nReceived: from quechua.inka.de\n ([193.197.184.2] helo=mail.inka.de ident=mail)\n by paranoia with esmtp (Exim 4.50)\n id 1E24Zm-0008Pl-Bq\n for [email protected]; Mon, 08 Aug 2005 12:09:51 +0200\nReceived: from adsl-67-118-169-226.dsl.lsan03.pacbell.net (adsl-67-118-169-226.dsl.lsan03.pacbell.net [67.118.169.226])\n by mail.inka.de with smtp \n id 1E24Ze-0001qC-00; Mon, 08 Aug 2005 12:09:39 +0200\nFCC: mailbox:\/\/[email protected]\/Sent\nX-Identity-Key: id1\nDate: Mon, 08 Aug 2005 04:11:18 -0700\nFrom: International Medical Corporation <[email protected]>\nX-Accept-Language: en-us, en\nMIME-Version: 1.0\nTo: [email protected]\nSubject: You have some free time? - Use it to make yourself wealthier!\nContent-Type: multipart\/related; boundary="------------000708090009050006030006"\nMessage-Id: <[email protected]>\nX-CRM114-Version: 20050415.BlameTheIRS ( TRE 0.7.2 (GPL) ) MF-A10FFB4C\nX-CRM114-Status: SPAM ( pR: -149.1499 )\nContent-Length: 21549\n\nThis is a multi-part message in MIME format.\n--------------000708090009050006030006\nContent-Type: text\/html; charset=us-ascii\nContent-Transfer-Encoding: 7bit\n\n<html><head><DEFANGED_meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1"><\/head><body bgcolor="#FFFFF4" text="#F2C2E6"><p><a href="mailto:[email protected]"><IMG SRC="cid:part1.07010905.07040200@[email protected]" border="0" ALT=""><\/a><\/p><p><font color="#FFFFFD">The Sims in 1960 Martha Stewart in 1948<\/font><\/p><p><font color="#FFFFF4">What number? Music<\/font><\/p><\/body><\/html>\n\n--------------000708090009050006030006\nContent-Type: image\/gif;\n name="clonic.GIF"\nContent-Transfer-Encoding: base64\nContent-ID: <part1.07010905.07040200@[email protected]>\nContent-Disposition: inline;\n filename="clonic.GIF"\n\nR0lGODlh1wIhAvH7AAYGAAAA\/\/\/\/\/wAAACH5BAQAAAAALAAAAADIAhYCAAL\/lI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1WgUktC8AV8H9PrxIMVgS\nxpgj3rWgDX833Q26zC7fHunxKB778\/VXgpcGMehTiHaByCBYh9AYSCFpUKl2ZunkJnYJ+Nl14OmhmDem\n...more garbage follows...\n\n--------------000708090009050006030006--\n\n\n/ |
| 28 |
{ |
| 29 |
match (:: :headers: :body:) /(.*?)\n\n(.*)/ |
| 30 |
} |
| 31 |
|
| 32 |
isolate (:headers:) |
| 33 |
{ |
| 34 |
match <nomultiline> [:headers:] /^Content-Type: .* boundary="(.+)"/ (:: :boundary:) |
| 35 |
} |
| 36 |
|
| 37 |
{ |
| 38 |
match <fromend> [:body:] (:: :headers:) /\n--:*:boundary:\n(.+?)\n\n/ |
| 39 |
output /:*:headers:\n\n/ |
| 40 |
liaf |
| 41 |
} |