[php-maint] Bug#476419: When i use the intern php-function preg_replace with a regex on a special text, i get a segmentation fault

Kai Szymanski k.szymanski at mediaclipping.de
Wed Apr 16 15:56:36 UTC 2008


Package: php5-cli
Version: 5.2.0-8+etch10
Severity: critical

Hi!

If write a simple script:

<?
$file = implode("",file($argv[1]));
echo "== Original: $file\n";
echo "== Replaced: ".preg_replace($argv[2],$argv[3],$file)."\n";
?>

and run it with

	php pregReplacetest.php "/\'{1,}(([^'])+)\'{1,}/ie" "TEST" testfile.txt

on a textfile i get a segmentation fault. I can send the File testfile.txt
to you if needed!

Best regards,
  Kai.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-amd64
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages php5-cli depends on:
ii  lib 1.0.3-6                              high-quality block-sorting file co
ii  lib 2.3.6.ds1-13etch5                    GNU C Library: Shared libraries
ii  lib 1.39+1.40-WIP-2006.11.14+dfsg-2etch1 common error description library
ii  lib 4.4.20-8                             Berkeley v4.4 Database Libraries [
ii  lib 1.4.4-7etch5                         MIT Kerberos runtime libraries
ii  lib 4.17-5etch3                          File type determination library us
ii  lib 5.5-5                                Shared libraries for terminal hand
ii  lib 6.7+7.4-3                            Perl 5 Compatible Regular Expressi
ii  lib 0.9.8c-4etch1                        SSL shared libraries
ii  lib 2.6.27.dfsg-2                        GNOME XML library
ii  mim 3.39-1                               MIME files 'mime.types' & 'mailcap
ii  php 5.2.0-8+etch10                       Common files for packages built fr
ii  ucf 2.0020                               Update Configuration File: preserv
ii  zli 1:1.2.3-13                           compression library - runtime

php5-cli recommends no packages.

-- no debconf information





More information about the pkg-php-maint mailing list