diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-11-14 15:49:25 +0100 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2021-11-14 14:55:29 +0000 |
| commit | 4cb9fdb63148d1281bbecf30a645a26367a18985 (patch) | |
| tree | 823eb42bccd7bcc371b286376a85823b9632090c | |
| parent | cf8c1a825bb80b472900c0ca2d0530f86271995d (diff) | |
| download | PROJ-4cb9fdb63148d1281bbecf30a645a26367a18985.tar.gz PROJ-4cb9fdb63148d1281bbecf30a645a26367a18985.zip | |
Merge pull request #2938 from rouault/fix_ossfuzz_40955
createOperationsCompoundToCompound(): fix null pointer dereference when connection to proj.db doesn't exist.
| -rw-r--r-- | src/iso19111/operation/coordinateoperationfactory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/iso19111/operation/coordinateoperationfactory.cpp b/src/iso19111/operation/coordinateoperationfactory.cpp index e9bd3cfe..9b891888 100644 --- a/src/iso19111/operation/coordinateoperationfactory.cpp +++ b/src/iso19111/operation/coordinateoperationfactory.cpp @@ -5250,8 +5250,10 @@ void CoordinateOperationFactory::Private::createOperationsCompoundToCompound( // and a geoid model for Belfast height referenced to ETRS89 if (verticalTransforms.size() == 1 && verticalTransforms.front()->hasBallparkTransformation()) { - auto dbContext = - context.context->getAuthorityFactory()->databaseContext(); + const auto &authFactory = context.context->getAuthorityFactory(); + auto dbContext = authFactory + ? authFactory->databaseContext().as_nullable() + : nullptr; const auto intermGeogSrc = srcGeog->promoteTo3D(std::string(), dbContext); const bool intermGeogSrcIsSameAsIntermGeogDst = |
