summaryrefslogtreecommitdiffstats
path: root/src/depfile_parser.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-03-12 15:59:45 (GMT)
committerNico Weber <nicolasweber@gmx.de>2015-03-12 15:59:45 (GMT)
commit8bab23be060ef6c79e35daa8e6deca18d00341f6 (patch)
tree0a9ab77f777f8acaddb8cb20a71e89e563135320 /src/depfile_parser.cc
parent51f06facf46e7a1a5338a4ca2ec9b8441c44c405 (diff)
downloadNinja-8bab23be060ef6c79e35daa8e6deca18d00341f6.zip
Ninja-8bab23be060ef6c79e35daa8e6deca18d00341f6.tar.gz
Ninja-8bab23be060ef6c79e35daa8e6deca18d00341f6.tar.bz2
Reject depfiles that don't contain a : after the target name.
This is a prerequisite for fixing #417.
Diffstat (limited to 'src/depfile_parser.cc')
-rw-r--r--src/depfile_parser.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/depfile_parser.cc b/src/depfile_parser.cc
index 4ca3943..7268f31 100644
--- a/src/depfile_parser.cc
+++ b/src/depfile_parser.cc
@@ -230,5 +230,9 @@ yy16:
return false;
}
}
+ if (parsing_targets) {
+ *err = "expected ':' in depfile";
+ return false;
+ }
return true;
}