It looks like the ASN_PRIV_IMPLIED_OCTET_STR switch case, assumes that
the rest of the instance is the fixed length string (and it does not
look for a preceeding string length component).
But what if the instance includes some other index type after this
fix-length string?
(It implies that the parsing mechanism MUST have the pre-defined length
of a fix-length string.)
By the way:
-----------------
I saw something that looks like a bug:
In the parse_one_oid_index() function (Net-SNMP 5.3.0.1):
*********************************************
if (uitmp > (int) (*oidLen)) {
for (i = 0; i < *oidLen; ++i)
var->val.string[i] = (u_char) * oidIndex++;
for (i = 0; i < uitmp; ++i) // Erez
Makavy: Is this a BUG?!!!
var->val.string[i] = '\0';
(*oidLen) = 0;
} else {
***********************************************
In this if cluase, the first 'for' startement is overridden by the
second 'for' statement.
(val.string, will always be set to all zeros)
-----Original Message-----
From: Wes Hardaker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 08, 2006 2:12 AM
To: Makavy, Erez (Erez)
Cc: [email protected]
Subject: Re: Can parse_oid_indexes() parse fixed-length string indexes?
>>>>> On Wed, 1 Mar 2006 19:40:58 +0200, "Makavy, Erez (Erez)"
<[EMAIL PROTECTED]> said:
Erez> I don't see in the table registration any information about the
indexes'
Erez> length (in case of fixed-length string)
Erez> And there is also no information about the length in the
Erez> parameters of
Erez> parse_oid_indexes()
Using a var of type ASN_PRIV_IMPLIED_OCTET_STR will force it to be a
fixed length string.
--
Wes Hardaker
Sparta, Inc.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users