Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
net-snmp
> net-snmp-5.3.1-smux-password.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File net-snmp-5.3.1-smux-password.diff of Package net-snmp (Revision 2)
Currently displaying revision
2
,
show latest
Index: agent/mibgroup/smux/smux.c =================================================================== RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/smux/smux.c,v retrieving revision 5.18 diff -u -r5.18 smux.c --- agent/mibgroup/smux/smux.c 15 Sep 2006 00:48:41 -0000 5.18 +++ agent/mibgroup/smux/smux.c 19 Sep 2006 14:55:13 -0000 @@ -137,6 +137,8 @@ smux_parse_peer_auth(const char *token, char *cptr) { smux_peer_auth *aptr; + char *password_cptr; + int cptr_len; if ((aptr = (smux_peer_auth *) calloc(1, sizeof(smux_peer_auth))) == NULL) { @@ -160,13 +162,21 @@ /* * oid */ + password_cptr = strchr(cptr, ' '); + cptr_len = strlen(cptr); + if (password_cptr) + *password_cptr = 0x0; + aptr->sa_oid_len = MAX_OID_LEN; read_objid( cptr, aptr->sa_oid, &aptr->sa_oid_len ); DEBUGMSGTL(("smux_conf", "parsing registration for: %s\n", cptr)); - cptr = skip_token(cptr); - DEBUGMSGTL(("smux_conf", "password is: %s\n", cptr ? cptr : "NULL")); + if ((&password_cptr - &cptr + 1) < cptr_len) { + cptr = ++password_cptr; + DEBUGMSGTL(("smux_conf", "password is: %s\n", + cptr ? cptr : "NULL")); + } /* * password