On Thu, Aug 18, 2016 at 05:59:30PM +0200, Pablo M. Bermudo Garay wrote: > 2016-08-17 16:23 GMT+02:00 Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>: > > On Tue, Aug 16, 2016 at 07:44:32PM +0200, Pablo M. Bermudo Garay wrote: > >> The comment_xlate function was not supporting this option that is > >> necessary in some situations. > > > > I have applied what I'm attaching to this email, that is more simple > > than this and makes sure buffer is nul-terminated (given snprintf > > doesn't guarantee this). > > Ok, the simplification seems great. But AFAIK both standards (C99+ and > POSIX.1-2001+) guarantee that the string will be null-terminated. Am I > wrong about that? If you write as many bytes as you can fit into the buffer, then snprintf doesn't guarantee a nul-terminated string. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html