-
Notifications
You must be signed in to change notification settings - Fork 211
Open
Description
I connect to a Septentrio RTK, in the function GPSDriverSBF::sendMessageAndWaitForAck
:
do {
--offset; //overwrite the null-char
int ret = read(reinterpret_cast<uint8_t *>(buf) + offset, sizeof(buf) - offset - 1, timeout);
if (ret < 0) {
// something went wrong when reading
SBF_WARN("sbf read err");
return false;
}
offset += ret;
buf[offset++] = '\0';
if (!found_response && strstr(buf, "$R: ") != nullptr) {
//SBF_DEBUG("READ %d: %s", (int) offset, buf);
found_response = true;
}
if (offset >= sizeof(buf)) {
offset = 1;
}
} while (time_started + 1000 * timeout > gps_absolute_time());
I get a runtime error:
Run-Time Check Failure #2 - Stack around the variable 'buf' was corrupted.
Can anyone tell is this a problem with my connection configuration or a problem with the code?
Metadata
Metadata
Assignees
Labels
No labels