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 <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
  • Loading branch information
rppt authored and xemul committed Jul 11, 2016
1 parent a21ee08 commit ba73a2d
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 ba73a2d

Please sign in to comment.