You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been tracing a problem with the command strings frequently being corrupted after using addCommand several times. I believe that the following line in SerialCommand.cpp is a bug:
The content of the memory block is preserved up to the lesser of the new and old sizes, even if the block is moved to a new location. If the new size is larger, the value of the newly allocated portion is indeterminate.
A simple but inelegant fix would be to hard-code the size of commandList in the header file and limit the maximum number of commands.
The text was updated successfully, but these errors were encountered:
This was a false alarm: realloc was not being used incorrectly. Apparently, the data corruption was coming from another source, that being the lack of sufficient RAM.
I've been tracing a problem with the command strings frequently being corrupted after using
addCommand
several times. I believe that the following line in SerialCommand.cpp is a bug:The C++ reference on
realloc
states the following:A simple but inelegant fix would be to hard-code the size of
commandList
in the header file and limit the maximum number of commands.The text was updated successfully, but these errors were encountered: