From 88b90c82259f86470cf6eba8684e8d9b4cd61bc3 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 3 May 2020 01:09:06 +0100 Subject: Fix a bug in savedata loading when malloc fails. Also added a bunch of asserts to tests where they don't check allocs. --- auto_tests/encryptsave_test.c | 1 + 1 file changed, 1 insertion(+) (limited to 'auto_tests/encryptsave_test.c') 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) ck_assert_msg(tox_is_data_encrypted(enc_data), "magic number missing"); struct Tox_Options *options = tox_options_new(nullptr); + ck_assert(options != nullptr); tox_options_set_savedata_type(options, TOX_SAVEDATA_TYPE_TOX_SAVE); tox_options_set_savedata_data(options, enc_data, size2); -- cgit v1.2.3