From 561fa7905030cb1240b7359ba829fa5afbf45b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zsolt=20V=C3=A1radi?= Date: Sun, 8 Sep 2019 11:05:03 +0200 Subject: [PATCH] Handle NULLs when decoding arrays (#142) * Add crashing test for decoding an array with NULL values * Fix crash on NULL values inside arrays --- .../Codable/PostgreSQLDataDecoder.swift | 7 +++++++ Tests/PostgreSQLTests/ConnectionTests.swift | 16 ++++++++++++++++ Tests/PostgreSQLTests/XCTestManifests.swift | 1 + 3 files changed, 24 insertions(+) diff --git a/Sources/PostgreSQL/Codable/PostgreSQLDataDecoder.swift b/Sources/PostgreSQL/Codable/PostgreSQLDataDecoder.swift index 53735a25..d416267b 100644 --- a/Sources/PostgreSQL/Codable/PostgreSQLDataDecoder.swift +++ b/Sources/PostgreSQL/Codable/PostgreSQLDataDecoder.swift @@ -63,6 +63,13 @@ struct PostgreSQLDataDecoder { let _ = value.extract(Int32.self).bigEndian for _ in 0..