Hans Leidekker : webservices: Reject field mappings without a description.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Apr 13 11:51:48 CDT 2016


Module: wine
Branch: master
Commit: 4bb2e5efea12560ca87500b53f10fd8e646df465
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4bb2e5efea12560ca87500b53f10fd8e646df465

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Apr 13 13:49:41 2016 +0200

webservices: Reject field mappings without a description.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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:




More information about the wine-cvs mailing list