aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-memcpy.c
diff options
context:
space:
mode:
authorDominique Martinet <[email protected]>2023-05-03 16:49:26 +0900
committerEric Van Hensbergen <[email protected]>2023-07-20 19:14:50 +0000
commit13ade4ac5c28e8a014fa85278f5a4270b215f906 (patch)
tree6c0ddb414fbb2d7b60e758555c721140e485f501 /lib/test_fortify/write_overflow-memcpy.c
parenteee4a119e96c2f58cfd1b6d4de42095abc5f8877 (diff)
9p: virtio: fix unlikely null pointer deref in handle_rerror
handle_rerror can dereference the pages pointer, but it is not necessarily set for small payloads. In practice these should be filtered out by the size check, but might as well double-check explicitly. This fixes the following scan-build warnings: net/9p/trans_virtio.c:401:24: warning: Dereference of null pointer [core.NullDereference] memcpy_from_page(to, *pages++, offs, n); ^~~~~~~~ net/9p/trans_virtio.c:406:23: warning: Dereference of null pointer (loaded from variable 'pages') [core.NullDereference] memcpy_from_page(to, *pages, offs, size); ^~~~~~ Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Dominique Martinet <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-memcpy.c')
0 files changed, 0 insertions, 0 deletions