summaryrefslogtreecommitdiff
path: root/auto_tests/encryptsave_test.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2020-05-03 01:09:06 +0100
committeriphydf <iphydf@users.noreply.github.com>2020-05-03 14:13:48 +0000
commit88b90c82259f86470cf6eba8684e8d9b4cd61bc3 (patch)
tree90e052389ffacec791019a096837a670e205b225 /auto_tests/encryptsave_test.c
parent7b758f66dbc550fa52ed66fd7f8b81f8ed37a94e (diff)
Fix a bug in savedata loading when malloc fails.
Also added a bunch of asserts to tests where they don't check allocs.
Diffstat (limited to 'auto_tests/encryptsave_test.c')
-rw-r--r--auto_tests/encryptsave_test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c
index 19574d16..ccb1ee88 100644
--- a/auto_tests/encryptsave_test.c
+++ b/auto_tests/encryptsave_test.c
@@ -76,6 +76,7 @@ static void test_save_friend(void)
76 ck_assert_msg(tox_is_data_encrypted(enc_data), "magic number missing"); 76 ck_assert_msg(tox_is_data_encrypted(enc_data), "magic number missing");
77 77
78 struct Tox_Options *options = tox_options_new(nullptr); 78 struct Tox_Options *options = tox_options_new(nullptr);
79 ck_assert(options != nullptr);
79 tox_options_set_savedata_type(options, TOX_SAVEDATA_TYPE_TOX_SAVE); 80 tox_options_set_savedata_type(options, TOX_SAVEDATA_TYPE_TOX_SAVE);
80 tox_options_set_savedata_data(options, enc_data, size2); 81 tox_options_set_savedata_data(options, enc_data, size2);
81 82