Re: [PATCH; request for votes] snmplib: Avoid that sprint_realloc_octet_string() triggers a segmentation fault
Bart Van Assche <[email protected]>
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <[email protected]> |
On 05/19/18 21:18, Robert Story wrote: > On Sat, 19 May 2018 14:07:56 -0700 Bart wrote: > BVA> strlcpy() implementations typically scan for the end of the > BVA> source argument passed to strlcpy(). Hence avoid passing an > BVA> unterminated string to strlcpy(). > > I'm going to say -1, but for the patch and not the need to fix the > issue. > > This code is treating 'a' and 't' hints the same. There should > never be UTF-8 in an ascii string. Why not revert back to the > original code for 'a' case and put UTF-8 handling where it belongs, > under the 't' case. Please have a look at the original bug reports. These reports apply to UTF-8 text stored in fields that have an 'a' (ASCII) display hint. Bart. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot