Re: [PATCH; request for votes] snmplib: Avoid that sprint_realloc_octet_string() triggers a segmentation fault

Magnus Fromreide <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <[email protected]>
On Mon, May 21, 2018 at 02:36:43PM -0400, Bill Fenner wrote:
> On Mon, May 21, 2018 at 11:18 AM, Wes Hardaker <
> [email protected]> wrote:
> 
> > Bill Fenner <[email protected]> writes:
> >
> > > So, +1 on committing Bart's patch, because it accomplishes the goal of
> > > fixing the regression, with the caveat that I really think that this
> > > whole area needs to be revisited.
> >
> > I think this comment is spot on.  So I'd accept the patch too, though my
> > gut reaction is to revert to whatever was in 5.7.1 because of the late
> > point in this release cycle and we're redsigning critical code on the
> > fly right before a release.
> >
> > We really need a test C function to check this stuff.  Any volunteers?
> > (I'm not a UTF-8 expert at all)
> 
> 
> The one I alluded to in an earlier email:
> http://bjoern.hoehrmann.de/utf-8/decoder/dfa/
> 
> If we accept the dense magic, the code can be used for both "is this string
> valid utf8" and "print all the valid utf8 if the last utf8-encoded
> character got cut off on an octet boundary".

Interesting piece of code.

What I am pondering is more what the 'a' encoding should do.
My reading of the rfc says that the display-hint "1t" should
display all ascii characters and suppress anything else while
a display-hint of "1a" or "255a" is a lot less specified. If we
assume a string containing iso-8859-1 (Latin 1) data then "1t"
should reject it (unless we are unlucky) and it is unclear what
an "a" display-hint should do with it.

>   Bill

> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot

> _______________________________________________
> Net-snmp-coders mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.