1
0
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:
Jfreegman
2014-10-03 17:53:50 -04:00
parent c56c6cc219
commit 23cf9686cb
12 changed files with 87 additions and 65 deletions

View File

@ -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;