ruby-changes:22768
From: naruse <ko1@a...>
Date: Sun, 26 Feb 2012 05:37:26 +0900 (JST)
Subject: [ruby-changes:22768] naruse:r34817 (trunk): * error.c (report_bug): use buf and snprintf to avoid consuming stack.
naruse 2012-02-26 05:37:15 +0900 (Sun, 26 Feb 2012) New Revision: 34817 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34817 Log: * error.c (report_bug): use buf and snprintf to avoid consuming stack. [ruby-dev:45272] [Bug #6058] Modified files: trunk/ChangeLog trunk/error.c Index: ChangeLog =================================================================== --- ChangeLog (revision 34816) +++ ChangeLog (revision 34817) @@ -1,3 +1,8 @@ +Sun Feb 26 05:35:43 2012 NARUSE, Yui <naruse@r...> + + * error.c (report_bug): use buf and snprintf to avoid consuming stack. + [ruby-dev:45272] [Bug #6058] + Sat Feb 25 17:41:19 2012 Tanaka Akira <akr@f...> * ext/dbm/extconf.rb (headers): try ambiguous headers at last. Index: error.c =================================================================== --- error.c (revision 34816) +++ error.c (revision 34817) @@ -260,9 +260,12 @@ (ssize_t)fwrite(buf, 1, len, (out = stdout)) == (ssize_t)len) { fputs("[BUG] ", out); - vfprintf(out, fmt, args); - fprintf(out, "\n%s\n\n", ruby_description); + vsnprintf(buf, 256, fmt, args); + fputs(buf, out); + snprintf(buf, 256, "\n%s\n\n", ruby_description); + fputs(buf, out); + rb_vm_bugreport(); fprintf(out, REPORTBUG_MSG); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/