From 1861f780de948cbfdad4357604a45441ec0b25ce Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Sat, 27 Nov 2021 13:54:39 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Handle=20nullptr=20in=20CardRead?= =?UTF-8?q?er::printLongPath=20(#23197)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/sd/cardreader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 513d682de6..b2f950bc04 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -359,7 +359,7 @@ void CardReader::ls(TERN_(LONG_FILENAME_HOST_SUPPORT, bool includeLongNames/*=fa // void CardReader::printLongPath(char * const path) { - int i, pathLen = strlen(path); + int i, pathLen = path ? strlen(path) : 0; // SERIAL_ECHOPGM("Full Path: "); SERIAL_ECHOLN(path);