php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2788 urldecode bug
Submitted: 1999-11-21 17:31 UTC Modified: 1999-11-21 21:11 UTC
From: hsheo at postech dot ac dot kr Assigned:
Status: Closed Package: Other
PHP Version: 3.0.12 OS: RedHat 6.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: hsheo at postech dot ac dot kr
New email:
PHP Version: OS:

 

 [1999-11-21 17:31 UTC] hsheo at postech dot ac dot kr
--- php-4.0b3/ext/standard/url.c.orig   Sun Nov 21 23:30:07 1999
+++ php-4.0b3/ext/standard/url.c        Sun Nov 21 23:38:59 1999
@@ -297,9 +297,14 @@
                var_reset(return_value);
                return;
        }
-       len = _php3_urldecode((*arg)->value.str.val, (*arg)->value.str.len);
 
-       RETVAL_STRINGL((*arg)->value.str.val, len, 1);
+       { char *str; /* Heo Hee-Seok: Bug fix */
+       str = (char *) emalloc((*arg)->value.str.len + 1);
+       strncpy(str, (*arg)->value.str.val, (*arg)->value.str.len + 1);
+       len = _php3_urldecode(str, (*arg)->value.str.len);
+
+       RETVAL_STRINGL(str, len, 1);
+       efree(str); }
 }
 /* }}} */
 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-21 21:11 UTC] sas at cvs dot php dot net
Thanks for the patch. I've fixed it in a slightly different way.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 03:01:28 2025 UTC