Re: [PATCH v2 4/8] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-01-14 Thread Gustavo A. R. Silva
Hi Willy, On 1/14/19 9:27 PM, Willy Tarreau wrote: From: Silvio Cesare Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more characters than wh

[PATCH v2 4/8] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-01-14 Thread Willy Tarreau
From: Silvio Cesare Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more characters than what the buffer size (SIZE) is, then size will end up la