bbqchickenrobot / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

Null dereference in sqlite3_log #129

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Repro steps:

1. Using SQLiteClient, create a connection using an invalid connection string, 
e.g.: "uri=file://Test-%s.db3; mode=600"
2. Create a command and then execute it.

We expect this to throw some kind of error since the "%" character is 
disallowed in a filename.

Instead, it never got a chance to send back an error, because a null 
dereference occurred in sqlite3_log, on line 1395 of printf_c.cs:
   if ( sqlite3GlobalConfig.xLog != null )

The code needs to check if sqlite3GlobalConfig is null, before attempting to 
access a member.  (Assuming that the variable is expected to be null.)

Original issue reported on code.google.com by tanza...@gmail.com on 25 Oct 2011 at 2:22

GoogleCodeExporter commented 9 years ago
Sorry, the actual cause is that I forgot to Open the transaction.

The null dereference is real, however.

Original comment by tanza...@gmail.com on 25 Oct 2011 at 2:29

GoogleCodeExporter commented 9 years ago

Original comment by noah.hart@gmail.com on 11 Nov 2011 at 1:32

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 7238514551b0.

Original comment by noah.hart@gmail.com on 20 Jun 2012 at 10:58