From: Felix Fietkau Date: Tue, 6 Jan 2009 20:10:53 +0000 (+0000) Subject: ead: fix array overrun X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=37e9d4cb8691d0fd9c98915da0eb3aaf7a31216b;p=openwrt%2Fstaging%2Fsvanheule.git ead: fix array overrun SVN-Revision: 13902 --- 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;