From 6b06431e9bcbef2eb1126dda01a68d4a81f0825e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 11 Aug 2013 15:24:47 +0200 Subject: 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. --- testing/nTox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testing/nTox.c') diff --git a/testing/nTox.c b/testing/nTox.c index 59d1cbf6..74db2ae2 100644 --- a/testing/nTox.c +++ b/testing/nTox.c @@ -113,7 +113,7 @@ char *format_message(Messenger *m, char *message, int friendnum) if (friendnum != -1) { getname(m, friendnum, (uint8_t*)name); } else { - getself_name(m, (uint8_t*)name); + getself_name(m, (uint8_t*)name, sizeof(name)); } char *msg = malloc(100+strlen(message)+strlen(name)+1); -- cgit v1.2.3