1 --- coova-chilli-1.2.4/src/chilli.c.orig 2010-08-24 13:29:08.000000000 +0200
2 +++ coova-chilli-1.2.4/src/chilli.c 2010-09-30 13:26:40.000000000 +0200
5 strncpy(appconn->s_state.redir.username, mac, USERNAMESIZE);
7 - if (_options.macsuffix)
8 - strncat(appconn->s_state.redir.username, _options.macsuffix, USERNAMESIZE);
9 + if (_options.macsuffix) {
10 + size_t ulen = strlen(appconn->s_state.redir.username + ulen);
11 + size_t size = USERNAMESIZE - ulen;
14 + appconn->s_state.redir.username[--size + ulen] = '\0';
15 + strncpy(appconn->s_state.redir.username + ulen, _options.macsuffix, size);
19 username = appconn->s_state.redir.username;