Fix overflow in strv_null_terminate, and don't make it increase .cnt

This commit is contained in:
Nils O. Selåsdal
2013-10-01 22:30:39 +02:00
parent dd517a5d85
commit d619d58ccd
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -68,6 +68,7 @@ START_TEST (test_strv_null_terminate)
rc = uc_strv_null_terminate(&strv);
fail_if(rc != 0);
fail_if(strv.cnt != 1); //shouldn't increase .cnt
fail_if(strv.strings[strv.cnt] != NULL);
uc_strv_destroy(&strv);