php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6145 printf & sprintf crash cgi on big strings (!!!)
Submitted: 2000-08-14 06:40 UTC Modified: 2000-08-14 07:10 UTC
From: d dot i at gmx dot net Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.1pl2 OS: Windows 2000 Pro
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: d dot i at gmx dot net
New email:
PHP Version: OS:

 

 [2000-08-14 06:40 UTC] d dot i at gmx dot net
This is a nasty one preventing my work to get done :(

A simple printf("%250s",$dummystring) makes php.exe CRASH.
I run that script by doing "php.exe -q test.php".

Same thing you can do with $dummy = sprintf("%250s",$whatever); .. same effect.

Is this a known problem? This sounds severe and for me as programmer it sounds like a buffer overrun, since smaller format-sizes (%50s) work perfect.

Danijel Ilisin

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-14 07:10 UTC] stas@php.net
Fixed in CVS, please check.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 28 22:00:01 2026 UTC