This bug was not an issue on hosted Linux or Rapsberry Pi (at least on the surface), but causes crashes on a Zynq SoC.
A buffer write was exceeded by 4 bytes, causing buffer overflow errors on that system.
The former implementation used the hardcoded value MAX_DATA_SIZE.
I replaced this with getMaximumMessageSize() but this is actually a problem because this will return the size with the header as well.
I suspect even a unit test would not have caught this because this was not an obvious issue on host systems. Maybe valgrind or a static code analyzer would have caught it..
This bug was not an issue on hosted Linux or Rapsberry Pi (at least on the surface), but causes crashes on a Zynq SoC.
A buffer write was exceeded by 4 bytes, causing buffer overflow errors on that system.
The former implementation used the hardcoded value `MAX_DATA_SIZE`.
I replaced this with `getMaximumMessageSize()` but this is actually a problem because this will return the size with the header as well.
I suspect even a unit test would not have caught this because this was not an obvious issue on host systems. Maybe `valgrind` or a static code analyzer would have caught it..
muellerr
added the bug label 2021-04-08 15:29:35 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This bug was not an issue on hosted Linux or Rapsberry Pi (at least on the surface), but causes crashes on a Zynq SoC.
A buffer write was exceeded by 4 bytes, causing buffer overflow errors on that system.
The former implementation used the hardcoded value
MAX_DATA_SIZE.I replaced this with
getMaximumMessageSize()but this is actually a problem because this will return the size with the header as well.I suspect even a unit test would not have caught this because this was not an obvious issue on host systems. Maybe
valgrindor a static code analyzer would have caught it..super evil bugfix for Linux MQto Important bugfix for Linux MQBug is also in OSAL for RTEMS!