On 23/9/21 12:35 am, Ryan Long wrote:
> I changed the definition of discardBuff to
>
> char discardBuff[100]{};
char discardBuff[100] = {};
?
> So that every element will be initialized to \0. This function is only used
> in TraceReaderLogQEMU.cc, and the values that are passed in are
>
> #define QEMU_LOG_IN_KEY "IN: "
> #define QEMU_LOG_SECTION_END "----------------"
>
> Neither are close to going over the size of discardBuff, but I can add a
> check and return false if it does happen to go over that length.
Checking how the call is being used is cheating ... :)
Lets make the code robust and if someone makes a change and makes a mistake it
is caught.
Chris
_______________________________________________
devel mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/devel