mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-05 03:16:45 +02:00
safer string handling
This commit is contained in:
@ -146,7 +146,7 @@ struct ToxWindow {
|
||||
|
||||
int active_box; /* For box notify */
|
||||
|
||||
char name[TOXIC_MAX_NAME_LENGTH];
|
||||
char name[TOXIC_MAX_NAME_LENGTH + 1];
|
||||
int32_t num; /* corresponds to friendnumber in chat windows */
|
||||
bool active;
|
||||
int x;
|
||||
@ -168,9 +168,9 @@ struct ToxWindow {
|
||||
/* statusbar info holder */
|
||||
struct StatusBar {
|
||||
WINDOW *topline;
|
||||
char statusmsg[TOX_MAX_STATUSMESSAGE_LENGTH];
|
||||
char statusmsg[TOX_MAX_STATUSMESSAGE_LENGTH + 1];
|
||||
uint16_t statusmsg_len;
|
||||
char nick[TOXIC_MAX_NAME_LENGTH];
|
||||
char nick[TOXIC_MAX_NAME_LENGTH + 1];
|
||||
int nick_len;
|
||||
uint8_t status;
|
||||
bool is_online;
|
||||
|
Reference in New Issue
Block a user