From e816b8ae1ffca491a67b1e12f75954ae2ccdbe95 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 9 Sep 2012 10:17:49 +0000 Subject: NULL terminate parameter arrays. --- Frameworks/PostgresKit/Source/FLXPostgresConnection.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Frameworks') diff --git a/Frameworks/PostgresKit/Source/FLXPostgresConnection.m b/Frameworks/PostgresKit/Source/FLXPostgresConnection.m index b3a3918b..ed23c050 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresConnection.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresConnection.m @@ -196,7 +196,6 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message _connectionError = [[NSString alloc] initWithUTF8String:PQerrorMessage(_connection)]; - // TODO: implement reconnection attempt return NO; } @@ -336,7 +335,7 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message // Register type extensions if (PQinitTypes(_connection)) { - NSLog(@"PostgresKit: Warning: Failed initialise type extensions. Connection might return unexpected results!"); + NSLog(@"PostgresKit: Error: Failed to initialise type extensions. Connection might return unexpected results!"); } [self _loadDatabaseParameters]; @@ -448,7 +447,12 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message if (hasDatabase) { _connectionParamNames[i] = FLXPostgresDatabaseParam; _connectionParamValues[i] = [_database UTF8String]; + + i++; } + + _connectionParamNames[i] = '\0'; + _connectionParamValues[i] = '\0'; } #pragma mark - -- cgit v1.2.3