diff options
Diffstat (limited to 'lib/tran_pipe.c')
-rw-r--r-- | lib/tran_pipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tran_pipe.c b/lib/tran_pipe.c index 4c3dc9c..48d8ea4 100644 --- a/lib/tran_pipe.c +++ b/lib/tran_pipe.c @@ -137,7 +137,7 @@ tran_pipe_recv(int fd, struct vfio_user_header *hdr, bool is_reply, } if (hdr->flags & VFIO_USER_F_ERROR) { - if (hdr->error_no <= 0) { + if (hdr->error_no <= 0 || hdr->error_no > SERVER_MAX_ERROR_NO) { hdr->error_no = EINVAL; } return ERROR_INT(hdr->error_no); |