diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-08-11 15:24:47 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-08-13 09:50:51 +0200 |
commit | 6b06431e9bcbef2eb1126dda01a68d4a81f0825e (patch) | |
tree | ab2ab59fc87488820469380049aa9334d96fe417 /auto_tests/messenger_test.c | |
parent | 6b256ffdb4b179a253a8cc55973314a6990985a0 (diff) |
core: Fix a possible buffer overflow using getself_name().
If the passed buffer is smaller than MAX_NAME_LENGTH then, you
will probably overflow it.
Diffstat (limited to 'auto_tests/messenger_test.c')
-rw-r--r-- | auto_tests/messenger_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c index 64b44d5f..28747899 100644 --- a/auto_tests/messenger_test.c +++ b/auto_tests/messenger_test.c | |||
@@ -169,7 +169,7 @@ START_TEST(test_getself_name) | |||
169 | char nick_check[len]; | 169 | char nick_check[len]; |
170 | 170 | ||
171 | setname(m, (uint8_t *)nickname, len); | 171 | setname(m, (uint8_t *)nickname, len); |
172 | getself_name(m, (uint8_t *)nick_check); | 172 | getself_name(m, (uint8_t *)nick_check, len); |
173 | 173 | ||
174 | ck_assert_msg((!STRINGS_EQUAL(nickname, nick_check)), | 174 | ck_assert_msg((!STRINGS_EQUAL(nickname, nick_check)), |
175 | "getself_name failed to return the known name!\n" | 175 | "getself_name failed to return the known name!\n" |