summaryrefslogtreecommitdiff
path: root/package/ead
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-01-06 20:10:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-01-06 20:10:53 +0000
commit37e9d4cb8691d0fd9c98915da0eb3aaf7a31216b (patch)
treef4d4f38d5a364c53827a107b97cc784b21e85ba7 /package/ead
parent0434df7feedd13445734a39b7d58f6206c97927f (diff)
downloadmtk-20170518-37e9d4cb8691d0fd9c98915da0eb3aaf7a31216b.zip
mtk-20170518-37e9d4cb8691d0fd9c98915da0eb3aaf7a31216b.tar.gz
mtk-20170518-37e9d4cb8691d0fd9c98915da0eb3aaf7a31216b.tar.bz2
ead: fix array overrun
SVN-Revision: 13902
Diffstat (limited to 'package/ead')
-rw-r--r--package/ead/src/ead.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/ead/src/ead.c b/package/ead/src/ead.c
index 91f6fba..6a01ea4 100644
--- a/package/ead/src/ead.c
+++ b/package/ead/src/ead.c
@@ -344,7 +344,7 @@ handle_set_username(struct ead_packet *pkt, int len, int *nstate)
set_state(EAD_TYPE_SET_USERNAME); /* clear old state */
strncpy(username, user->username, sizeof(username));
- username[sizeof(username)] = 0;
+ username[sizeof(username) - 1] = 0;
msg = &pktbuf->msg;
msg->len = 0;