[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/5] Fix Length calculation in PdoQueryId
On 13/09/2023 15:15, Owen Smith wrote: Decrease Length by the string length of the current ID before moving the Buffer value to the end of the current ID. Without this, Length is not decreased, leading to potential issues with the next call to RtlStringCbPrintfW. Note: second chunk it to maintain consistent ordering of operations, and is not a functional change Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx> --- src/xenvif/pdo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Acked-by: Paul Durrant <paul@xxxxxxx> diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c index 1d163c9..d43702e 100644 --- a/src/xenvif/pdo.c +++ b/src/xenvif/pdo.c @@ -2100,11 +2100,11 @@ PdoQueryId( Revision->Number); ASSERT(NT_SUCCESS(status));- Buffer += wcslen(Buffer);Length -= (ULONG)(wcslen(Buffer) * sizeof (WCHAR)); + Buffer += wcslen(Buffer);- Buffer++;Length -= sizeof (WCHAR); + Buffer++;--Index;}
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |