On Thu, 22 Jun 2006 12:32:47 -0700 Wes wrote:
WH> So.... The solution? Either:
WH>
WH> A) The solution you've done which is to create a new
WH> wrapper function. Put that in the base code and encourage it for
WH> all use of strings which need to be null terminated.
WH>
WH> B) encourage people to simply pass in the re-allocatable bit if
WH> they're going to print. Then reallocate if you're at exact
WH> length so you can add the null.
I vote A. Firmly. Loudly.
WH> Robert> No, sorry. There is no reason to force anyone who understands
WH> Robert> the ASN strings come with a length to allocate bigger buffers
WH> Robert> because some people don't understand ASN strings.
WH>
WH> Now, having said all of the above: the one thing here is that very
WH> very few places in general code need to call asn parsing functions
WH> directly.
Consistency dictates that if we change it null termination here, we do the
same in read_config_read_octet_string(). This is a higher level function more
likely to be used by end users.
--
NOTE: messages sent directly to me, instead of the lists, will be deleted
unless they are requests for paid consulting services.
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>
You are lost in a twisty maze of little standards, all different.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders