From cc8f86e873d51ec33e028fca6a1c7027a206b62f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 25 Jul 2012 11:14:23 -0700 Subject: [PATCH] ensure simple invalid inputs to wkb do not crash - closes #1333 --- tests/python_tests/geometry_io_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/python_tests/geometry_io_test.py b/tests/python_tests/geometry_io_test.py index 1eeef4db6..d93b72605 100644 --- a/tests/python_tests/geometry_io_test.py +++ b/tests/python_tests/geometry_io_test.py @@ -54,6 +54,10 @@ wkbs = [ [ 1, "GEOMETRYCOLLECTION(POINT EMPTY,MULTIPOINT(0 0))", '010700000002000000010400000000000000010400000001000000010100000000000000000000000000000000000000'], [ 0, "LINESTRING EMPTY", '010200000000000000' ], [ 1, "Point(0 0)", '010100000000000000000000000000000000000000' ], + # a few bogus inputs + [ 0, "", '' ], + [ 0, "00", '01' ], + [ 0, "0000", '0104' ], ] def test_wkb_parsing():