On Fri, May 13, 2016 at 02:46:36PM +0300, Kirill Yukhin wrote: > NP. Below is the patch which fixes both issues. > It also revealed, that for "*and" pattern 32 byte long > internal buffer is not enough. > I've extended bunch of such buffers to 128 bytes. > > Probably we might want to re-factor all static char arrays w/ > std::string or at least check how many bytes snprintf actually prints > and ICE if overflow.
I'd prefer not to use std::string for that, but snprintf and asserts on the result look reasonable thing to do (though, the snprintf shouldn't be inside of the assert) obviously. Jakub