mirror of
https://git.freebsd.org/ports.git
synced 2025-06-18 19:20:36 -04:00
- Add patch for security issue Obtained from: http://seclists.org/oss-sec/2013/q1/393 Security: forthcoming
31 lines
775 B
Text
31 lines
775 B
Text
--- lib/gauntlet_rubyparser.rb.orig 2013-02-24 17:26:38.158253105 +0000
|
|
+++ lib/gauntlet_rubyparser.rb 2013-02-24 17:27:26.653251094 +0000
|
|
@@ -35,18 +35,19 @@
|
|
def diff_pp o1, o2
|
|
require 'pp'
|
|
|
|
- File.open("/tmp/a.#{$$}", "w") do |f|
|
|
- PP.pp o1, f
|
|
- end
|
|
+ file_a = Tempfile.new('ruby_parser_a')
|
|
+ PP.pp o1, file_a
|
|
+ file_a.close
|
|
+
|
|
+ file_b = Tempfile.new('ruby_parser_b')
|
|
+ PP.pp o2, file_b
|
|
+ file_b.close
|
|
|
|
- File.open("/tmp/b.#{$$}", "w") do |f|
|
|
- PP.pp o2, f
|
|
- end
|
|
|
|
- `diff -u /tmp/a.#{$$} /tmp/b.#{$$}`
|
|
+ `diff -u #{file_a.path} #{file_b.path}`
|
|
ensure
|
|
- File.unlink "/tmp/a.#{$$}" rescue nil
|
|
- File.unlink "/tmp/b.#{$$}" rescue nil
|
|
+ file_a.unlink
|
|
+ file_b.unlink
|
|
end
|
|
|
|
def broke name, file, msg
|