Subject: | uninitialized variable in dbdimp.c:249 (SUSE bugzilla#156965) |
A trivial one: sqlite_st_prepare() returns an sqlite_error during
early parameter checking, if dbh is inactive or statement is empty.
This is before initializing retval. Better use hardcoded values here.
I currently use 0, you may have something more meaningful.
Thanks, Jw.
Subject: | sqlite_dbimp.no_uninit.diff |
--- /tmp/buildsystem.w3d.jw/usr/src/packages/BUILD/DBD-SQLite-1.11/dbdimp.c.orig 2005-12-02 18:28:53.000000000 +0100
+++ /tmp/buildsystem.w3d.jw/usr/src/packages/BUILD/DBD-SQLite-1.11/dbdimp.c 2006-03-13 22:13:51.176441795 +0100
@@ -246,12 +246,12 @@
int retval;
if (!DBIc_ACTIVE(imp_dbh)) {
- sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, "attempt to prepare on inactive database handle");
+ sqlite_error(sth, (imp_xxh_t*)imp_sth, 0, "attempt to prepare on inactive database handle");
return FALSE;
}
if (strlen(statement) < 1) {
- sqlite_error(sth, (imp_xxh_t*)imp_sth, retval, "attempt to prepare empty statement");
+ sqlite_error(sth, (imp_xxh_t*)imp_sth, 0, "attempt to prepare empty statement");
return FALSE;
}