aboutsummaryrefslogtreecommitdiffstats
path: root/package/ead/src/ead.c
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
commitc5254e1d0201606e966e202ebace9f614d35049b (patch)
tree7dec808d71b9919b0ca0ca42a0a069cccfdfd09b /package/ead/src/ead.c
parent56046f5ae78449f663e0e8cc0cc9c25875a73de8 (diff)
downloadupstream-c5254e1d0201606e966e202ebace9f614d35049b.tar.gz
upstream-c5254e1d0201606e966e202ebace9f614d35049b.tar.bz2
upstream-c5254e1d0201606e966e202ebace9f614d35049b.zip
ead: fix array overrun
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13902 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ead/src/ead.c')
-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 91f6fbaf70..6a01ea42dd 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;