[4/9] webservices: Reject field mappings without a description.
Hans Leidekker
hans at codeweavers.com
Wed Apr 13 06:49:41 CDT 2016
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
dlls/webservices/reader.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c
index 34b62e7..f09781e 100644
--- a/dlls/webservices/reader.c
+++ b/dlls/webservices/reader.c
@@ -2731,18 +2731,19 @@ static WS_READ_OPTION map_field_options( WS_TYPE type, ULONG options )
static HRESULT read_type_struct_field( struct reader *reader, const WS_FIELD_DESCRIPTION *desc,
WS_HEAP *heap, char *buf )
{
- char *ptr = buf + desc->offset;
+ char *ptr;
WS_READ_OPTION option;
ULONG size;
HRESULT hr;
- if (!(option = map_field_options( desc->type, desc->options ))) return E_INVALIDARG;
+ if (!desc || !(option = map_field_options( desc->type, desc->options ))) return E_INVALIDARG;
if (option == WS_READ_REQUIRED_VALUE)
size = get_type_size( desc->type, desc->typeDescription );
else
size = sizeof(void *);
+ ptr = buf + desc->offset;
switch (desc->mapping)
{
case WS_ATTRIBUTE_FIELD_MAPPING:
--
2.8.0.rc3
More information about the wine-patches
mailing list