Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.

Commit 197e498

Browse files
committed
Reproduce error reported on #50, NULL terminator in input cause error.
Indeed we internally use CString::new that return NulError if the string contains NULL characters.
1 parent b3d8e18 commit 197e498

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/correctness/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,12 @@ def test_without_file(self):
854854
shutil.rmtree(path)
855855
self.assertTrue(True)
856856

857+
class TestNullTerminatedStrings(TestRediSQLWithExec):
858+
def test_null_terminated(self):
859+
with DB(self, "NULL"):
860+
one = self.exec_naked("REDISQL.EXEC", "NULL", "SELECT 1" + b'\x00')
861+
self.assertEquals(one, [[1]])
862+
857863
if __name__ == '__main__':
858864
unittest.main()
859865

0 commit comments

Comments
 (0)