Message ID | 20210122082144.16186-1-hui.wang@canonical.com |
---|---|
Headers | show |
Series | audio jack software injection | expand |
Dne 22. 01. 21 v 9:21 Hui Wang napsal(a):
> + len = scnprintf(buf, 256, "0x%04x", mask_bits);
Use sizeof(buf) on all appropriate places. Also never use user space 'count'
variable for the stack buffer size.
Jaroslav
On 1/22/21 4:40 PM, Jaroslav Kysela wrote: > Dne 22. 01. 21 v 9:21 Hui Wang napsal(a): > >> + len = scnprintf(buf, 256, "0x%04x", mask_bits); > Use sizeof(buf) on all appropriate places. Also never use user space 'count' > variable for the stack buffer size. > > Jaroslav Oh, right, will use sizeof(buf). Will not use 'count' for stack buffer size. Thanks, Hui. >