php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68771 Incorrect array
Submitted: 2015-01-08 13:53 UTC Modified: 2015-01-12 15:24 UTC
From: bugreports at internot dot info Assigned: ab (profile)
Status: Closed Package: SQLite related
PHP Version: master-Git-2015-01-08 (Git) OS: Linux Ubuntu 14.04
Private report: No CVE-ID: None
 [2015-01-08 13:53 UTC] bugreports at internot dot info
Description:
------------
Hi,

In /ext/sqlite3/libsqlite/sqlite3.c:

139815/* 13 */  "SELECT idx, start_block, leaves_end_block, end_block, root "
139816            "FROM %Q.'%q_segdir' WHERE level BETWEEN ? AND ?"
139817            "ORDER BY level DESC, idx ASC",

The end of L139816 is missing a space, causing the arrya to become 
"[..] BETWEEN ? AND ?ORDER BY [..]"
which is obviously incorrect and will cause an SQL error.


Thanks,


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-12 15:24 UTC] danack@php.net
-Assigned To: +Assigned To: ab
 [2015-01-12 15:24 UTC] danack@php.net
This does look like a typo. Every other mutli-line entry in the file has spaces to avoid this.

I've attempted to report it upstream.....and the bug report is awaiting moderator approval.

ab I've assigned the bug to you as appear to be the person who touched the file last. Apologies in advance if that's not the correct thing to do.
 [2015-01-12 16:03 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ef5862253480ee9f6be0dd4dc6c7d87b0a5cc935
Log: Fixed bug #68771 SQL syntax error in sqlite lib
 [2015-01-12 16:03 UTC] ab@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri May 14 02:01:23 2021 UTC