diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-11-12 20:40:57 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-11-12 20:40:57 (GMT) |
commit | 23c11b4efae2e1a8aeeb98aaaed96ad6ec76b460 (patch) | |
tree | b94e0121ea799081509a2365ed36a2026b4ef6a4 /src/util.cc | |
parent | 6aa1b4b6d3d2d3efa55f91649271ed253ef5cab7 (diff) | |
parent | fb320646918dac633bdb4e449e7d0f372d83d01d (diff) | |
download | Ninja-23c11b4efae2e1a8aeeb98aaaed96ad6ec76b460.zip Ninja-23c11b4efae2e1a8aeeb98aaaed96ad6ec76b460.tar.gz Ninja-23c11b4efae2e1a8aeeb98aaaed96ad6ec76b460.tar.bz2 |
Merge pull request #849 from sgraham/set-err-canon-components
set *err when too many components in CanonicalizePath
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.cc b/src/util.cc index 4df81dd..7717ef4 100644 --- a/src/util.cc +++ b/src/util.cc @@ -145,8 +145,10 @@ bool CanonicalizePath(char* path, size_t* len, unsigned int* slash_bits, bits_offset++; } } - if (bits_offset > 32) + if (bits_offset > 32) { + *err = "too many path components"; return false; + } bits_offset = 0; #endif |