Carlo Bramix

- Prevent possible out-of-bounds access.
See issue #5505 for more details.

svn path=/trunk/; revision=48495
This commit is contained in:
Aleksey Bragin 2010-08-09 20:41:41 +00:00
parent 9d1462a2b7
commit 07a6bcfb57

View file

@ -73,7 +73,7 @@ CdfsGetPVDData(PUCHAR Buffer,
/* Extract the volume label */ /* Extract the volume label */
pc = Pvd->VolumeId; pc = Pvd->VolumeId;
pw = CdInfo->VolumeLabel; pw = CdInfo->VolumeLabel;
for (i = 0; i < MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR); i++) for (i = 0; i < (MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)) - 1; i++)
{ {
*pw++ = (WCHAR)*pc++; *pw++ = (WCHAR)*pc++;
} }