Skip to content

Commit d56524e

Browse files
committed
VFK: avoid potential nullptr dereference
should likely fix https://issues.oss-fuzz.com/issues/441564453
1 parent 2b35d1a commit d56524e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ogr/ogrsf_frmts/vfk/vfkreaderp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class VFKReader : public IVFKReader
8080

8181
bool IsValid() const override
8282
{
83-
return true;
83+
return m_poFD != nullptr;
8484
}
8585

8686
bool HasFileField() const override
@@ -143,7 +143,7 @@ class VFKReaderSQLite : public VFKReader
143143

144144
bool IsValid() const override
145145
{
146-
return m_poDB != nullptr;
146+
return VFKReader::IsValid() && m_poDB != nullptr;
147147
}
148148

149149
int ReadDataBlocks(bool = false) override;

0 commit comments

Comments
 (0)