Commit 4af93a42 authored by Michael Ott's avatar Michael Ott
Browse files

Check for pos pointer not to exceed 128 bits in SensorDataStoreImpl::topicToSid()

parent eb15a7a9
......@@ -69,7 +69,7 @@ bool SensorDataStoreImpl::topicToSid(SensorId* sid, std::string topic)
const char* buf = topic.c_str();
sid->raw[0] = 0;
sid->raw[1] = 0;
while (*buf) {
while (*buf && pos < 128) {
if (*buf >= '0' && *buf <= '9') {
sid->raw[pos / 64] |= (((uint64_t)(*buf - '0')) << (60-(pos%64)));
pos += 4;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment