diff options
| author | Greg Steuck <blackgnezdo@gmail.com> | 2018-11-27 04:16:05 -0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-11-27 13:16:05 +0100 |
| commit | 0b29b7f95253d645475f4cc66a74f653437fa72d (patch) | |
| tree | b1ec00ce49d96d04a9606f6745ffcf9a1534c9d3 /prog/analysis.go | |
| parent | 6419afbb779b26af853b46d8ad79cfe52b6f7805 (diff) | |
prog: prevent sandbox escaping files from entering s.files
Diffstat (limited to 'prog/analysis.go')
| -rw-r--r-- | prog/analysis.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/prog/analysis.go b/prog/analysis.go index c26e14014..f03f828b9 100644 --- a/prog/analysis.go +++ b/prog/analysis.go @@ -83,7 +83,7 @@ func (s *state) analyzeImpl(c *Call, resources bool) { case BufferString: s.strings[val] = true case BufferFilename: - if len(val) < 3 { + if len(val) < 3 || escapingFilename(val) { // This is not our file, probalby one of specialFiles. return } |
