Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
cdefae9e
Commit
cdefae9e
authored
Jun 14, 2015
by
Erich E. Hoover
Committed by
Alexandre Julliard
Jun 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix IOCTL_DVD_READ_STRUCTURE expected output size.
parent
4e91fa5f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
cdrom.c
dlls/ntdll/cdrom.c
+23
-1
No files found.
dlls/ntdll/cdrom.c
View file @
cdefae9e
...
...
@@ -2491,6 +2491,28 @@ static NTSTATUS DVD_GetRegion(int fd, PDVD_REGION region)
#endif
}
static
DWORD
DVD_ReadStructureSize
(
const
DVD_READ_STRUCTURE
*
structure
,
DWORD
size
)
{
if
(
!
structure
||
size
!=
sizeof
(
DVD_READ_STRUCTURE
))
return
0
;
switch
(
structure
->
Format
)
{
case
DvdPhysicalDescriptor
:
return
sizeof
(
DVD_LAYER_DESCRIPTOR
);
case
DvdCopyrightDescriptor
:
return
sizeof
(
DVD_COPYRIGHT_DESCRIPTOR
);
case
DvdDiskKeyDescriptor
:
return
sizeof
(
DVD_DISK_KEY_DESCRIPTOR
);
case
DvdBCADescriptor
:
return
sizeof
(
DVD_BCA_DESCRIPTOR
);
case
DvdManufacturerDescriptor
:
return
sizeof
(
DVD_MANUFACTURER_DESCRIPTOR
);
default:
return
0
;
}
}
/******************************************************************
* DVD_ReadStructure
*
...
...
@@ -3097,7 +3119,7 @@ NTSTATUS CDROM_DeviceIoControl(HANDLE hDevice,
}
break
;
case
IOCTL_DVD_READ_STRUCTURE
:
sz
=
sizeof
(
DVD_LAYER_DESCRIPTOR
);
sz
=
DVD_ReadStructureSize
(
lpInBuffer
,
nInBufferSize
);
if
(
lpInBuffer
==
NULL
||
nInBufferSize
!=
sizeof
(
DVD_READ_STRUCTURE
))
status
=
STATUS_INVALID_PARAMETER
;
else
if
(
nOutBufferSize
<
sz
||
!
lpOutBuffer
)
status
=
STATUS_BUFFER_TOO_SMALL
;
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment