...
Code Block | ||
---|---|---|
| ||
void f2() { const size_t ARR_SIZE = 4; float a[4ARR_SIZE]; const size_t n= sizeof(int) * ARR_SIZE; void *p = a; memset(p, 0, n); /* More program code */ } |
...
Code Block | ||
---|---|---|
| ||
void f2() { const size_t ARR_SIZE = 4; float a[4ARR_SIZE]; const size_t n= sizeof(float) * ARR_SIZE; void *p = a; memset(p, 0, n); /* More program code */ } |
...
WG14 Document: N1579 - Rule 5.34 Forming Invalid pointers by library functions.
...