diff --git a/xen/common/compat/grant_table.c b/xen/common/compat/grant_table.c index 744f9b6e3d..f8177c84c0 100644 --- a/xen/common/compat/grant_table.c +++ b/xen/common/compat/grant_table.c @@ -176,7 +176,12 @@ int compat_grant_table_op( { \ for ( i = 0; i < (_s_)->nr_frames; ++i ) \ { \ - unsigned int frame = (_s_)->frame_list.p[i]; \ + compat_pfn_t frame = (_s_)->frame_list.p[i]; \ + if ( frame != (_s_)->frame_list.p[i] ) \ + { \ + (_s_)->status = GNTST_address_too_big; \ + break; \ + } \ if ( __copy_to_compat_offset((_d_)->frame_list, \ i, &frame, 1) ) \ { \