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
Describe the bug
The function calls strlen as: strlen(EventBuffer-1)
To Reproduce
This is undefined behavior but probably works by accident most of the time, so long as the byte before EventBuffer is not null. This also generates a compiler warning which somehow was never noticed before in previous reviews of this code (gcc 7.4.0 with -Wall switch)
Expected behavior
It probably was meant to be: strlen(EventBuffer)-1
System observed on:
Ubuntu 18.04 (64-bit), kernel 5.0.0-23-generic, gcc 7.4.0-1ubuntu1~18.04.1
Reporter Info
Joe Hickey
The text was updated successfully, but these errors were encountered:
Note: Although the sample config does use -Wall by default, it appears GCC can only trigger this warning if also using -O2 or above, which is probably why it wasn't noticed in previous reviews/verification.
Describe the bug
The function calls strlen as:
strlen(EventBuffer-1)
To Reproduce
This is undefined behavior but probably works by accident most of the time, so long as the byte before EventBuffer is not null. This also generates a compiler warning which somehow was never noticed before in previous reviews of this code (gcc 7.4.0 with -Wall switch)
Expected behavior
It probably was meant to be:
strlen(EventBuffer)-1
System observed on:
Ubuntu 18.04 (64-bit), kernel 5.0.0-23-generic, gcc 7.4.0-1ubuntu1~18.04.1
Reporter Info
Joe Hickey
The text was updated successfully, but these errors were encountered: