php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48 filesize() function crashes PHP
Submitted: 1998-02-10 08:30 UTC Modified: 1998-02-24 13:39 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: sbedberg at ucdavis dot edu Assigned:
Status: Closed Package: Other
PHP Version: 3.0b4 OS: Windozer NT 4.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sbedberg at ucdavis dot edu
New email:
PHP Version: OS:

 

 [1998-02-10 08:30 UTC] sbedberg at ucdavis dot edu
CODE SNIPPET:

if (filesize($thisgif) > 2) {
   $typelist[$row['type']] = "<img src=\"$thisgif\"> $thisname<br>";
} else {
   $typelist[$row['type']] = "<b>($thistype)</b> $thisname<br>";
}

DETAILED DESCRIPTION:

I was using filesize() as a file existence check for a .gif
file. Upon reaching the if... line, PHP hung in memory &
required an NT server restart (the NT Process Monitor
refused to kill it).

I haven't had a chance to check any of the other filesystem
routines under WinNT...might this be an artifact of the
Unix->Windopey NT port?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-02-24 13:39 UTC] shane
Fixed in b5
 [2020-02-20 09:17 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=349241
Log: Fix \Ds\Map::values() example

Patch by enumag.

Closes php/doc-en#48.
 [2021-02-24 21:09 UTC] langemeijer@php.net
Automatic comment on behalf of casper.langemeijer@procurios.nl
Revision: http://git.php.net/?p=pecl/networking/ssh2.git;a=commit;h=78d953ef9e89ea60757114caaf8f262042730371
Log: Merge pull request #48: Fix #80294: ssh2 wrappers not using an allocated resource segfault
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 22:01:33 2024 UTC