From dc82769e6188156066d0110ad32bb6879a4f20e5 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 9 Jan 2004 00:34:14 +0000 Subject: [PATCH] Mapping a zero size file should fail. --- server/mapping.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/mapping.c b/server/mapping.c index 092f48a863e..f84f51c4ab4 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -289,6 +289,11 @@ static struct object *create_mapping( int size_high, int size_low, int protect, if (!size_high && !size_low) { 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 {