aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-10-19 22:59:55 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-10-19 22:59:55 +0200
commitcaa512b5b135fcf00a01695a5860009671316eb2 (patch)
tree09888568324d6a9db6e1707e8eeb6cd15309c073 /src
parent20b8604f3fef503015010a1c4fe37771d679e42c (diff)
downloadPROJ-caa512b5b135fcf00a01695a5860009671316eb2.tar.gz
PROJ-caa512b5b135fcf00a01695a5860009671316eb2.zip
createFromPROJString(): do not loop forever on malformed string. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17923. master only
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/io.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp
index b442f993..0c5b2f1a 100644
--- a/src/iso19111/io.cpp
+++ b/src/iso19111/io.cpp
@@ -8236,6 +8236,8 @@ static double getAngularValue(const std::string &paramValue,
// ---------------------------------------------------------------------------
static bool is_in_stringlist(const std::string &str, const char *stringlist) {
+ if (str.empty())
+ return false;
const char *haystack = stringlist;
while (true) {
const char *res = strstr(haystack, str.c_str());