From 33d4125a8f471ab52455051479609cbb6da9ca0a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 19 Apr 2015 11:59:22 +0200 Subject: [PATCH] ntdll: Potential buffer overwrite (Coverity). --- dlls/ntdll/cdrom.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c index 34910e77986..25a3fde7706 100644 --- a/dlls/ntdll/cdrom.c +++ b/dlls/ntdll/cdrom.c @@ -3090,8 +3090,11 @@ NTSTATUS CDROM_DeviceIoControl(HANDLE hDevice, sz = sizeof(DVD_REGION); if (lpInBuffer != NULL || nInBufferSize != 0) status = STATUS_INVALID_PARAMETER; else if (nOutBufferSize < sz) status = STATUS_BUFFER_TOO_SMALL; - TRACE("doing DVD_Get_REGION\n"); - status = DVD_GetRegion(fd, lpOutBuffer); + else + { + TRACE("doing DVD_Get_REGION\n"); + status = DVD_GetRegion(fd, lpOutBuffer); + } break; case IOCTL_DVD_READ_STRUCTURE: sz = sizeof(DVD_LAYER_DESCRIPTOR);