Mapping a zero size file should fail.

This commit is contained in:
Mike McCormack 2004-01-09 00:34:14 +00:00 committed by Alexandre Julliard
parent a16d725964
commit dc82769e61
1 changed files with 5 additions and 0 deletions

View File

@ -289,6 +289,11 @@ static struct object *create_mapping( int size_high, int size_low, int protect,
if (!size_high && !size_low) if (!size_high && !size_low)
{ {
if (!get_file_size( mapping->file, &size_high, &size_low )) goto error; if (!get_file_size( mapping->file, &size_high, &size_low )) goto error;
if (!size_high && !size_low)
{
set_error( STATUS_FILE_INVALID );
goto error;
}
} }
else else
{ {