diff options
| author | Denis Efremov <efremov@linux.com> | 2019-09-30 23:31:47 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-21 10:35:25 +0100 |
| commit | b9ff5e4ad3e90aeb47a08cfc7948b449ea037cf4 (patch) | |
| tree | dcd0db07c76f523c8233d79821f40047977af578 /scripts/basic | |
| parent | bd0c9ceb8ab93fccb5f00590e0cafd3662a948ed (diff) | |
ar5523: check NULL before memcpy() in ar5523_cmd()
commit 315cee426f87658a6799815845788fde965ddaad upstream.
memcpy() call with "idata == NULL && ilen == 0" results in undefined
behavior in ar5523_cmd(). For example, NULL is passed in callchain
"ar5523_stat_work() -> ar5523_cmd_write() -> ar5523_cmd()". This patch
adds ilen check before memcpy() call in ar5523_cmd() to prevent an
undefined behavior.
Cc: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: stable@vger.kernel.org
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
