Commit 4f6e1caf authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville
Browse files

brcmfmac: add parameter check in brcmf_c_mkiovar()

This patch assures data is only appended in output buffer when
data is not NULL and datalen is not zero.
Reviewed-by: default avatarHante Meuleman <>
Reviewed-by: default avatarPieter-Paul Giesberts <>
Signed-off-by: default avatarArend van Spriel <>
Signed-off-by: default avatarJohn W. Linville <>
parent 9cd23a71
......@@ -80,8 +80,10 @@ brcmf_c_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen)
strncpy(buf, name, buflen);
/* append data onto the end of the name string */
memcpy(&buf[len], data, datalen);
len += datalen;
if (data && datalen) {
memcpy(&buf[len], data, datalen);
len += datalen;
return len;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment