Skip to content

Commit d7f260d

Browse files
committed
Fix buffer overflow.
1 parent 7ab4836 commit d7f260d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/04.MQTT/mqtt.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ void __cheri_callback publishCallback(const char *topicName,
6868
return;
6969
}
7070

71-
Debug::log("Got a PUBLISH for topic {}", topicName);
71+
Debug::log("Got a PUBLISH for topic {}",
72+
std::string_view{topicName, topicNameLength});
7273
publishReceived++;
7374
}
7475

0 commit comments

Comments
 (0)