From: CPANSec Security Scanner Bot Subject: [PATCH] PDF::WebKit: use 3-arg open for output/stylesheet reads to_pdf reads the generated PDF back, and _style_tag_for reads each stylesheet, using the diamond operator over a locally-set @ARGV. `<>` performs Perl's 2-argument magic open on each element, so the value is not always taken as a file name: "cmd |" runs cmd and returns its output in place of the file, "| cmd" runs cmd, and "> path" or ">> path" opens that path for writing, truncating it in the first form (CWE-78, CWE-73). Switch both sites to 3-argument open, which always treats its argument as a file name. The failure behaviour of each site is kept as it was. In to_pdf an unreadable path leaves $output undefined, so the existing "command failed" check still reports the renderer failure that usually causes it, and the read-back is done in binary mode to match the ':raw' layers that run3 was given. In _style_tag_for an unreadable stylesheet warns and contributes an empty "; }