mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-11-18 22:43:53 +01:00
ead: fix array overrun
SVN-Revision: 13902
This commit is contained in:
parent
0434df7fee
commit
37e9d4cb86
@ -344,7 +344,7 @@ handle_set_username(struct ead_packet *pkt, int len, int *nstate)
|
|||||||
|
|
||||||
set_state(EAD_TYPE_SET_USERNAME); /* clear old state */
|
set_state(EAD_TYPE_SET_USERNAME); /* clear old state */
|
||||||
strncpy(username, user->username, sizeof(username));
|
strncpy(username, user->username, sizeof(username));
|
||||||
username[sizeof(username)] = 0;
|
username[sizeof(username) - 1] = 0;
|
||||||
|
|
||||||
msg = &pktbuf->msg;
|
msg = &pktbuf->msg;
|
||||||
msg->len = 0;
|
msg->len = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user