Issue #6726 has been updated by drbrain (Eric Hodel). Category set to ext Assignee set to knu (Akinori MUSHA) Priority changed from Low to Normal ---------------------------------------- Bug #6726: Syslog crashes when the special %m tag (of syslog(3)) is present in the message https://bugs.ruby-lang.org/issues/6726#change-27987 Author: ameuret (Arnaud MEURET) Status: Open Priority: Normal Assignee: knu (Akinori MUSHA) Category: ext Target version: ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux] The %m special escape sequence supported by the syslog(3) system call is claimed by the Ruby doc to be supported by the ::Syslog Ruby class. However the implementation of ::Syslog in ext/syslog/syslog.c:49 (https://github.com/ruby/ruby/blob/trunk/ext/syslog/syslog.c#L49) calls rb_f_sprintf() which does not tolerate the presence of %m in the format string. A quick dump of a pry session demonstrating the crash: [1] pry(main)> require 'syslog' => true [2] pry(main)> Syslog.open => <#Syslog: opened=true, ident="pry", options=3, facility=8, mask=255> [3] pry(main)> ::Syslog.info "Hi !%m" ArgumentError: malformed format string - %m from (pry):3:in `info -- http://bugs.ruby-lang.org/