Bug in IOCTL_CDROM_RAW_READ / CDROM.SYS ?

Hello,

yet onother problem:

Does anyone know how Win2K reads audio data for the digital CD audio
feature? I ask this question because there is one thing in the
IOCTL_CDROM_RAW_READ path in CDROM.SYS which I think is a bug:

==== CDROM.C =========
if ((((ULONGLONG) startingOffset.QuadPart) + transferBytes)
>
(ULONGLONG) commonExtension->PartitionLength.QuadPart) {

DebugPrint((1,"CdRomDeviceControl: Invalid I/O parameters for
XA "
“Read (Request Out of Bounds)\n”));

//
// Fail request with status of invalid parameters.
//

status = STATUS_INVALID_PARAMETER;
break;
}

At this point startingOffset and PartitionLength are something like
“SectorNr*2048”, while transferBytes is “NumSectors*2352”. This definitely
prevents me from raw reading the last sector. Given that I read more than
one sector at a time, the whole last block fails.

On NT 4 we installed our own CD-ROM driver to fix this and we other known
problems. Now on Win2K I’ll try to work around this, hoping that someone
from microsoft tells me that I am wrong or that this will be fixed some
day.

Best regards,
Detlef Golze