1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-01-23 11:51:05 +02:00

ead: fix array overrun

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13902 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2009-01-06 20:10:53 +00:00
parent f868e3c1dc
commit de5423c8f5

View File

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