[php-maint] Bug#759561: php5-common: PHP 5.4.4-14+deb7u14: finfo_buffer generates out of memory error on sample file

flod flod at lodolo.net
Thu Aug 28 14:22:21 UTC 2014

Package: php5-common
Version: 5.4.4-14+deb7u14
Severity: normal

Dear Maintainer,

Starting after last update, this simple code generates an out of memory error

	$filename = 'test.lang';
	$filecontent = file_get_contents($filename);
	$info = finfo_open(FILEINFO_MIME_ENCODING);
	$type = finfo_buffer($info, $filecontent);
	print "{$type} - {$filename}";

PHP Fatal error:  Out of memory (allocated 524288) (tried to allocate 4294965546 bytes) 
in /home/user/test.php on line 6

Sample file to read: https://www.dropbox.com/s/ii8ybpk8bvxw1rz/test.lang?dl=0

Not sure how useful it is, but if I remove line 352 the error disappears.
If I put only that line in one file I don't get any error.

Same code has been working fine with this file for several months.

-- System Information:
Debian Release: 7.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages php5-common depends on:
ii  dpkg    1.16.15
ii  libc6   2.13-38+deb7u4
ii  lsof    4.86+dfsg-1
ii  psmisc  22.19-1+deb7u1
ii  sed     4.2.1-10
ii  ucf     3.0025+nmu3

php5-common recommends no packages.

php5-common suggests no packages.

-- no debconf information

More information about the pkg-php-maint mailing list