aboutsummaryrefslogtreecommitdiffstats
path: root/src/Components/Ble/NotificationManager.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-06-28 11:59:14 +0200
committerJF <jf@codingfield.com>2020-06-28 11:59:14 +0200
commit89e7033830bd73a35f4bb2faf14ccf06f3785712 (patch)
treec8fd9c5d09518623215f383ca429f364b1012a4d /src/Components/Ble/NotificationManager.h
parent4f9adb2372a71bab3c38684420cf90b1a99a6c9a (diff)
Fix buffer overflow opportunities in AlertNotificationService & AlertNotificationClient.
Diffstat (limited to 'src/Components/Ble/NotificationManager.h')
-rw-r--r--src/Components/Ble/NotificationManager.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Components/Ble/NotificationManager.h b/src/Components/Ble/NotificationManager.h
index 8edd6828..daa1571b 100644
--- a/src/Components/Ble/NotificationManager.h
+++ b/src/Components/Ble/NotificationManager.h
@@ -7,10 +7,10 @@ namespace Pinetime {
class NotificationManager {
public:
enum class Categories {Unknown, SimpleAlert, Email, News, IncomingCall, MissedCall, Sms, VoiceMail, Schedule, HighProriotyAlert, InstantMessage };
- static constexpr uint8_t MessageSize = 18;
+ static constexpr uint8_t MessageSize{18};
struct Notification {
- std::array<char, MessageSize> message;
+ std::array<char, MessageSize+1> message;
Categories category = Categories::Unknown;
};