]> git.openfabrics.org - compat-rdma/compat-rdma.git/commit
BACKPORT qed: Fix copying 2 strings
authorMichal Kalderon <michal.kalderon@cavium.com>
Sun, 8 Jul 2018 17:08:35 +0000 (20:08 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Mon, 9 Jul 2018 15:36:03 +0000 (10:36 -0500)
commit16a7a0f6307829e99f506568165a377f516df853
tree369ba1ec485a68e801f1098933a21898fe6cf7b0
parent617edf6bfed1bf5fd9d26ba220a8b48bcaff64a3
BACKPORT qed: Fix copying 2 strings

The strscpy() was a recent fix (net: qed: use correct strncpy() size) to
prevent passing the length of the source buffer to strncpy() and guarantee
null termination.
It misses the goal of overwriting only the first 3 characters in
"???_BIG_RAM" and "???_RAM" while keeping the rest of the string.
Use strncpy() with the length of 3, without null termination.

Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com>
Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
patches/0005-BACKPORT-qed-Fix-copying-2-strings.patch [new file with mode: 0644]