Menu ▾ ▴

#14 SQLite3::escapeString truncates strings containing \0 (0x00)

open
nobody
None
5
2012-11-01
2012-11-01
Anonymous
No

SQLite3::escapeString does not correctly handle strings that contain ascii 0x00 (aka \0).

Calling SQLite3::escapeString( "x\0y" ) will return "x". No warnign or notice is issued, the string is just silently truncated.

The behavior concerning \0 needs to be documented, and \0 should be accepted, or escapeString should fail noisily if \0 is present (e.g. by triggering a php warning and returning false).

I'm using php5-sqlite 5.3.6-13ubuntu3.9

Discussion


Log in to post a comment.