diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-03-07 19:18:58 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-03-07 19:18:58 +0100 |
| commit | c021126079afa2e77416a673818abac6512eba69 (patch) | |
| tree | 1f9df11c2b49e88881aedf320b25cdd45fe841a3 /src/pipeline.cpp | |
| parent | b0fa082511744402e1a5c46a9f17728745163e88 (diff) | |
| download | PROJ-c021126079afa2e77416a673818abac6512eba69.tar.gz PROJ-c021126079afa2e77416a673818abac6512eba69.zip | |
pipeline: avoid CLang Static Analyzer 10.0 likely false positive about dereferencing a nullptr
Diffstat (limited to 'src/pipeline.cpp')
| -rw-r--r-- | src/pipeline.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pipeline.cpp b/src/pipeline.cpp index b1989824..88793027 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -465,8 +465,8 @@ PJ *OPERATION(pipeline,0) { return destructor (P, PROJ_ERR_OTHER /*ENOMEM*/); /* Do some syntactical sanity checking */ - for (i = 0; i < argc; i++) { - if (0==strcmp (argv_sentinel, argv[i])) { + for (i = 0; i < argc && argv[i] != nullptr; i++) { + if ( 0==strcmp (argv_sentinel, argv[i])) { if (-1==i_pipeline) { proj_log_error (P, _("Pipeline: +step before +proj=pipeline")); return destructor (P, PROJ_ERR_INVALID_OP_WRONG_SYNTAX); |
