summaryrefslogtreecommitdiff
path: root/ASNMP
diff options
context:
space:
mode:
authormrm <mrm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-08-20 20:06:30 +0000
committermrm <mrm@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-08-20 20:06:30 +0000
commit8f35ed65ca60d4be0d1a4206e09ef91b8099401a (patch)
tree71976c8d206cf6da72a141f15fb4be6f53e7f2a1 /ASNMP
parent869227cbe6cfb34689911d5efe582dd0932082ee (diff)
downloadATCD-8f35ed65ca60d4be0d1a4206e09ef91b8099401a.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.cpp9
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: