diff options
| author | Finlay Davidson <finlay.davidson@coderclass.nl> | 2023-03-16 22:18:04 +0100 |
|---|---|---|
| committer | Finlay Davidson <finlay.davidson@coderclass.nl> | 2023-03-16 22:18:04 +0100 |
| commit | a7746d3a3118e40bf3fc0bebc2dce77d9beb29aa (patch) | |
| tree | f17a632cb11ae6ad0c2dab45e7b33f4aaf872c24 /src/components/ble/NotificationManager.h | |
| parent | 11ade64166c8900abb5574dd9d4aa2ae597f69c5 (diff) | |
notification: Initialise message
Prevents reading uninitialised memory if notification gets cut off due
to being more than 100 chars. The last character is assumed to be \0, but
it is actually uninitialised.
Diffstat (limited to 'src/components/ble/NotificationManager.h')
| -rw-r--r-- | src/components/ble/NotificationManager.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/ble/NotificationManager.h b/src/components/ble/NotificationManager.h index 09b5a561..f68a68af 100644 --- a/src/components/ble/NotificationManager.h +++ b/src/components/ble/NotificationManager.h @@ -30,7 +30,7 @@ namespace Pinetime { Id id = 0; bool valid = false; uint8_t size; - std::array<char, MessageSize + 1> message; + std::array<char, MessageSize + 1> message {}; Categories category = Categories::Unknown; const char* Message() const; |
