commit | 062d0f22a30c39840ea49b72cfcfc1aa4cc538fa | [log] [tgz] |
---|---|---|
author | Michael Mera <dev@michaelmera.com> | Mon May 01 15:41:16 2017 +0900 |
committer | Doug Ledford <dledford@redhat.com> | Mon May 01 15:04:23 2017 -0400 |
tree | 828b88cd5adbbeac367ec477ec502c294eb05949 | |
parent | b03ee4ca0cec348c84dccf08aaec2454c4d236c2 [diff] |
IB/ocrdma: fix out of bounds access to local buffer In write to debugfs file 'resource_stats' the local buffer 'tmp_str' is written at index 'count-1' where 'count' is the size of the write, so potentially 0. This patch filters odd values for the write size/position to avoid this type of problem. Signed-off-by: Michael Mera <dev@michaelmera.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>