Em ter., 17 de mai. de 2022 às 20:18, Justin Pryzby <pryzby@telsasoft.com> escreveu:
On Tue, May 17, 2022 at 07:52:30PM -0300, Ranier Vilela wrote: > I found, I believe, a serious problem of incorrect usage of the memset api. > Historically, people have relied on using memset or MemSet, using the > variable name as an argument for the sizeof. > While it works correctly, for arrays, when it comes to pointers to > structures, things go awry.
Knowing how sizeof() works is required before using it - the same is true for pointers.