Skip to content

Commit

Permalink
criu: lazy-pages: take care of possible NULL pointer dereference
Browse files Browse the repository at this point in the history
Fix CID 163485 (#2 of 2): Dereference null return value (NULL_RETURNS)
7. dereference: Dereferencing a pointer that might be null dest when
calling handle_user_fault.

Signed-off-by: Mike Rapoport <[email protected]>
Signed-off-by: Pavel Emelyanov <[email protected]>
  • Loading branch information
rppt authored and xemul committed Aug 15, 2016
1 parent c90e40b commit 5121500
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions criu/uffd.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ static int handle_requests(int epollfd, struct epoll_event *events)

for (i = 0; i < ret; i++) {
lpi = uffd_to_lpi(events[i].data.fd);
BUG_ON(!lpi);
ret = handle_user_fault(lpi, dest);
if (ret < 0)
goto out;
Expand Down

0 comments on commit 5121500

Please sign in to comment.