Loading...
 

STM32MP1 support available in SW4STM32

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4; you can download a short video showcasing this on the ac6-tools website (registration required).

System Workbench for STM32


You are viewing a reply to STM32H7 strcat bug  

STM32H7 strcat bug

France

Hi,

There’s no bug in strcat; the line you don’t understand loads the first 4 bytes from PCC_VERSION (“2.08”) then stores them at the end of msgStr (r2 contains the length of msgStr, that is the number of bytes before the first zero-byte in msgStr).

Strcat is effectively a dangerous function for two reasons:

  1. You may overflow the destination buffer, as strcat can’t make any check
  2. If ever the destination string was not initialized, the initial strlen may yield a very big value and you will write somewhere where you don’t expect...


So I urge you to check your code, but I can ensure you the strcat code is correct...

Hope this helps,

Bernard (Ac6)