[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Fix VS2013 SDV failures
The code in registry.c needs the same prefast suppression as it does in XENBUS. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- src/xenvif/registry.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/xenvif/registry.c b/src/xenvif/registry.c index 5843ef5..519d3f6 100644 --- a/src/xenvif/registry.c +++ b/src/xenvif/registry.c @@ -168,16 +168,16 @@ RegistryOpenHardwareKey( goto fail1; Length = 0; - (VOID) ZwQueryKey(SubKey, - KeyNameInformation, - NULL, - 0, - &Length); - - status = STATUS_INVALID_PARAMETER; - if (Length == 0) + status = ZwQueryKey(SubKey, + KeyNameInformation, + NULL, + 0, + &Length); + if (status != STATUS_BUFFER_OVERFLOW && + status != STATUS_BUFFER_TOO_SMALL) goto fail2; - + +#pragma prefast(suppress:6102) Info = __RegistryAllocate(Length + sizeof (WCHAR)); status = STATUS_NO_MEMORY; @@ -362,9 +362,11 @@ RegistryEnumerateSubKeys( NULL, 0, &Size); - if (status != STATUS_BUFFER_TOO_SMALL) + if (status != STATUS_BUFFER_OVERFLOW && + status != STATUS_BUFFER_TOO_SMALL) goto fail1; +#pragma prefast(suppress:6102) Full = __RegistryAllocate(Size); status = STATUS_NO_MEMORY; @@ -463,9 +465,11 @@ RegistryEnumerateValues( NULL, 0, &Size); - if (status != STATUS_BUFFER_TOO_SMALL) + if (status != STATUS_BUFFER_OVERFLOW && + status != STATUS_BUFFER_TOO_SMALL) goto fail1; +#pragma prefast(suppress:6102) Full = __RegistryAllocate(Size); status = STATUS_NO_MEMORY; @@ -596,9 +600,11 @@ RegistryQueryDwordValue( NULL, 0, &Size); - if (status != STATUS_BUFFER_TOO_SMALL) + if (status != STATUS_BUFFER_OVERFLOW && + status != STATUS_BUFFER_TOO_SMALL) goto fail2; +#pragma prefast(suppress:6102) Partial = __RegistryAllocate(Size); status = STATUS_NO_MEMORY; @@ -821,9 +827,11 @@ RegistryQuerySzValue( NULL, 0, &Size); - if (status != STATUS_BUFFER_TOO_SMALL) + if (status != STATUS_BUFFER_OVERFLOW && + status != STATUS_BUFFER_TOO_SMALL) goto fail2; +#pragma prefast(suppress:6102) Value = __RegistryAllocate(Size); status = STATUS_NO_MEMORY; @@ -892,10 +900,12 @@ RegistryQueryKeyName( NULL, 0, &Size); - if (status != STATUS_BUFFER_TOO_SMALL) + if (status != STATUS_BUFFER_OVERFLOW && + status != STATUS_BUFFER_TOO_SMALL) goto fail1; // Name information is not intrinsically NULL terminated +#pragma prefast(suppress:6102) Value = __RegistryAllocate(Size + sizeof (WCHAR)); status = STATUS_NO_MEMORY; -- 2.1.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |