diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-05-02 08:46:04 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-05-02 08:46:04 +0300 |
commit | 4b34c875f7166d8bddf57952c3ed46b1291bdf77 (patch) | |
tree | 38f82417f28ff922148487f7f5dec2acbf489d15 /lib/gitlab/ci/trace | |
parent | 6ed91266d021c2058697d12a0123bec9b00548ad (diff) |
Add guardclause of offset < 0 in #truncate
Diffstat (limited to 'lib/gitlab/ci/trace')
-rw-r--r-- | lib/gitlab/ci/trace/chunked_io.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/ci/trace/chunked_io.rb b/lib/gitlab/ci/trace/chunked_io.rb index f03c7071b46..cd3d1364411 100644 --- a/lib/gitlab/ci/trace/chunked_io.rb +++ b/lib/gitlab/ci/trace/chunked_io.rb @@ -134,7 +134,7 @@ module Gitlab end def truncate(offset) - raise ArgumentError, 'Outside of file' if offset > size + raise ArgumentError, 'Outside of file' if offset > size || offset < 0 return if offset == size # Skip the following process as it doesn't affect anything @tell = offset |