Jeremy.
BOOL asn1_read_OID(ASN1_DATA *data, char **OID)
{
uint8 b;
- pstring oid;
+ pstring oid_str;
fstring el;
if (!asn1_start_tag(data, ASN1_OID)) return False;
asn1_read_uint8(data, &b);
- oid[0] = 0;
+ oid_str[0] = 0;
fstr_sprintf(el, "%u", b/40);
- pstrcat(oid, el);
+ pstrcat(oid_str, el);
fstr_sprintf(el, " %u", b%40);
- pstrcat(oid, el);
+ pstrcat(oid_str, el);
while (asn1_tag_remaining(data) > 0) {
unsigned v = 0;
v = (v<<7) | (b&0x7f);
} while (!data->has_error && b & 0x80);
fstr_sprintf(el, " %u", v);
- pstrcat(oid, el);
+ pstrcat(oid_str, el);
}
asn1_end_tag(data);
- *OID = strdup(oid);
+ *OID = strdup(oid_str);
return !data->has_error;
}
asn1_start_tag(&data,ASN1_CONTEXT(0));
asn1_start_tag(&data,ASN1_SEQUENCE(0));
for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS; i++) {
- char *oid = NULL;
- asn1_read_OID(&data,&oid);
- OIDs[i] = oid;
+ char *oid_str = NULL;
+ asn1_read_OID(&data,&oid_str);
+ OIDs[i] = oid_str;
}
OIDs[i] = NULL;
asn1_end_tag(&data);
asn1_start_tag(&data, ASN1_CONTEXT(0));
asn1_start_tag(&data, ASN1_SEQUENCE(0));
for (i=0; asn1_tag_remaining(&data) > 0 && i < ASN1_MAX_OIDS; i++) {
- char *oid = NULL;
- asn1_read_OID(&data,&oid);
- OIDs[i] = oid;
+ char *oid_str = NULL;
+ asn1_read_OID(&data,&oid_str);
+ OIDs[i] = oid_str;
}
OIDs[i] = NULL;
asn1_end_tag(&data);
#else
-static int net_ads_noads(int argc, const char **argv)
+static int net_ads_noads(void)
{
d_printf("ADS support not compiled in\n");
return -1;