php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58498 Whitespace in query bug
Submitted: 2009-01-09 08:18 UTC Modified: 2009-03-04 07:17 UTC
From: alex dot trofast at ingres dot com Assigned: grantc@php.net (profile)
Status: Closed Package: ingres (PECL)
PHP Version: 5.2.5 OS: Ubuntu 8.10 64 bit
Private report: No CVE-ID: None
 [2009-01-09 08:18 UTC] alex dot trofast at ingres dot com
Description:
------------
If whitespace exists in front of a query when using the ingres_query function the query type will not be determined properly.

Reproduce code:
---------------
Patch to fix this issue:

--- /home/troal01/Download/ingres-2.0.1/ingres.c        2008-12-20 03:36:17.000000000 -0500
+++ ingres.c    2009-01-07 15:03:27.000000000 -0500
@@ -1689,6 +1689,13 @@
         }
     }

+    /*Remove any leading white space*/
+    while(isspace(*query))
+    {
+       query++;
+       query_len--;
+    }
+
     /* determine what sort of query is being executed */
     query_type = php_ii_query_type(query TSRMLS_CC);




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-04 07:17 UTC] grant dot croker at ingres dot com
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 pecl.php.net.

In case this was a pecl.php.net 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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 14:01:31 2024 UTC