Check the address provided to vm_map_stack() against the vm map's maximum,

returning an error if the address is too high.
This commit is contained in:
Alan Cox 2003-07-01 03:57:25 +00:00
parent 89a14234bd
commit 8526ce9b64
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117093

View File

@ -2460,7 +2460,8 @@ vm_map_stack (vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize,
if (addrbos < vm_map_min(map))
return (KERN_NO_SPACE);
if (addrbos > map->max_offset)
return (KERN_NO_SPACE);
if (max_ssize < sgrowsiz)
init_ssize = max_ssize;
else