|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58723 Incorrect while loop increment in uploadprogress.c
Submitted: 2009-06-15 16:58 UTC Modified: 2009-06-16 01:43 UTC
From: terralith at yahoo dot com Assigned:
Status: Closed Package: uploadprogress (PECL)
PHP Version: 5.2.9 OS: CentOS 5
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: terralith at yahoo dot com
New email:
PHP Version: OS:


 [2009-06-15 16:58 UTC] terralith at yahoo dot com
In HEAD (rev 1.21) of uploadprogress.c, in uploadprogress_file_php_get_info(), it seems that one of the whitespace-skip loops is incrementing the wrong pointer variable.

Reproduce code:
Lines 402-403:
/* trim spaces in front of the name/value */
while (*k && *k <= 32) v++;

Should be:
/* trim spaces in front of the name/value */
while (*k && *k <= 32) k++;

Expected result:
Whitespace at the beginning of each key and value gets skipped/ignored.

Actual result:
If the key contains leading whitespace, a possibility for an infinite loop exists.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-15 16:59 UTC] terralith at yahoo dot com
Set the correct version (had entered the PHP version before)
 [2009-06-15 17:00 UTC] terralith at yahoo dot com
 [2009-06-16 01:43 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Thanks for your patch. I will release 1.0.1 soon.
 [2011-08-28 21:29 UTC] ARIFCASHCARRY at hotmail dot co dot uk accutane 209 propecia results 851
 [2011-08-31 20:50 UTC] moritascoral at k7 dot dion dot ne dot jp priligy best price %-DD valtrex order online pharmacy %-)
 [2011-09-03 20:59 UTC] countrycodes at iso dot org prednisone 608129 colchicine 5735
 [2011-09-12 21:11 UTC] ryukoshokai at khe dot biglobe dot ne dot jp propecia >:-))) topamax 545842
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 16:01:30 2024 UTC