diff options
author | mrm <mrm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-08-20 20:06:30 +0000 |
---|---|---|
committer | mrm <mrm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-08-20 20:06:30 +0000 |
commit | 014295f80df37c865cce3e206268793d7b24c396 (patch) | |
tree | 71976c8d206cf6da72a141f15fb4be6f53e7f2a1 /ASNMP | |
parent | 58cc518a686e0a89b43fe14cfd293e896f05739a (diff) | |
download | ATCD-014295f80df37c865cce3e206268793d7b24c396.tar.gz |
fixed allocation error according to workshop access checking
extend by 1 the array size allocation
Diffstat (limited to 'ASNMP')
-rw-r--r-- | ASNMP/asnmp/asn1.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ASNMP/asnmp/asn1.cpp b/ASNMP/asnmp/asn1.cpp index 8fca59c39cf..be20caac287 100644 --- a/ASNMP/asnmp/asn1.cpp +++ b/ASNMP/asnmp/asn1.cpp @@ -1535,7 +1535,6 @@ int cmu_snmp::parse( struct snmp_pdu *pdu, oid objid[MAX_NAME_LEN], *op; u_char *origdata = data; int origlength = length; - u_char *save_data; // authenticates message and returns length if valid data = cmu_snmp::auth_parse(data, @@ -1559,8 +1558,6 @@ int cmu_snmp::parse( struct snmp_pdu *pdu, spp_version = (snmp_version) version; - save_data = data; - data = asn1::parse_header(data, &length, &msg_type); @@ -1695,9 +1692,9 @@ int cmu_snmp::parse( struct snmp_pdu *pdu, case SMI_IPADDRESS: case SMI_OPAQUE: case SMI_NSAP: - ACE_NEW_RETURN(vp->val.string, u_char[(unsigned)vp->val_len], -1); - asn1::parse_string(var_val, &len, &vp->type, - vp->val.string, &vp->val_len); + ACE_NEW_RETURN(vp->val.string, u_char[(unsigned)vp->val_len + 1], -1); + asn1::parse_string(var_val, &len, &vp->type, vp->val.string, + &vp->val_len); break; case ASN_OBJECT_ID: |