Hey,
Paul Vriens wrote:
> we have quite a few places in the code where we do:
>
> WCHAR param[any-value];
>
> len = sizeof(param) / sizeof(WCHAR);
And there lies the next potential bug. If somebody changes the type of
param this will result in a wrong length. For this reason the Linux
Kernel guy
Paul Vriens a écrit :
Hi,
we have quite a few places in the code where we do:
WCHAR param[any-value];
len = sizeof(param) / sizeof(WCHAR);
param[len] = '\0';
and of course more-or-less the same for CHAR arrays.
This could lead (and the example does) to writing behind the end of
param.
I've
Hi,
we have quite a few places in the code where we do:
WCHAR param[any-value];
len = sizeof(param) / sizeof(WCHAR);
param[len] = '\0';
and of course more-or-less the same for CHAR arrays.
This could lead (and the example does) to writing behind the end of
param.
I've submitted two patches f