GNOME Bugzilla – Bug 596859
don't rely on moz_cookies schema columns/order
Last modified: 2009-10-02 07:32:40 UTC
Created attachment 144384 [details] [review] explicity QUERY_ALL we received ephy webkit crashes like: 13:23 < seb128> ==7517== Invalid read of size 1 13:23 < seb128> ==7517== at 0x569668F: callback (soup-cookie-jar-sqlite.c:210) 13:23 < seb128> ==7517== by 0x5FE5C27: sqlite3_exec (in /usr/lib/libsqlite3.so.0.8.6) 13:23 < seb128> ==7517== by 0x5696417: exec_query_with_try_create_table (soup-cookie-jar-sqlite.c:246) problem seems to be QUERY_ALL which just uses * however, the schema is not guaranteed to have the same column order. for instance we have those too schemas in the wild: 13:42 < xan-afk> CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT,expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER); vs. 13:39 < asac> xan-afk: .schema moz_cookies 13:39 < asac> CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT,expiry INTEGER, isSecure INTEGER, isHttpOnly INTEGER, lastAccessed INTEGER); attaching patch to make QUERY_ALL explicit about the columns it wants and the order.
the patch fixes the crash there
Pushed this to master, thanks!