Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Coenen <manuel@duet3d.com>2021-01-20 13:52:09 +0300
committerManuel Coenen <manuel@duet3d.com>2021-01-20 13:52:09 +0300
commite0f70c42bc156339d3018b1c6eff03a532266c5a (patch)
tree0d4a75fd922d59136e2efbab9364157eb965627a /src/Duet3Mini
parente875fc3c25056b8afeb815b4012c24b347c228b1 (diff)
Fix nullptr access in LookupPinName
Diffstat (limited to 'src/Duet3Mini')
-rw-r--r--src/Duet3Mini/Pins_Duet3Mini.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Duet3Mini/Pins_Duet3Mini.cpp b/src/Duet3Mini/Pins_Duet3Mini.cpp
index 4acf87c2..500f8051 100644
--- a/src/Duet3Mini/Pins_Duet3Mini.cpp
+++ b/src/Duet3Mini/Pins_Duet3Mini.cpp
@@ -30,6 +30,10 @@ bool LookupPinName(const char *pn, LogicalPin &lpin, bool &hardwareInverted) noe
for (size_t lp = 0; lp < ARRAY_SIZE(PinTable); ++lp)
{
const char *q = PinTable[lp].pinNames;
+ if (q == nullptr)
+ {
+ continue;
+ }
while (*q != 0)
{
// Try the next alias in the list of names for this pin