Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-5008

[PATCH] Fixed CDFS volume name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.3.12
    • Drivers: Other
    • None
    • Operating System: ReactOS
      Platform: x86 Hardware

    Description

      Created an attachment (id=5189)
      Fix for this bug.

      The attached patch solves two issues:

      1) I inserted a CD into the drive and the system misteriously freezed.
      The problem happened because Pvd->VolumeId had all its 32 characters busy and no spaces into it.
      Probably it crashed because, since Pvd->VolumeId is 32 bytes and CdInfo->VolumeLabel is MAXIMUM_VOLUME_LABEL_LENGTH = 32 * sizeof(WCHAR) = 64 bytes, it could not find a space in the name (because, in my case, in the label there are '_' instead of ' ').
      So the 'for' cycle will surely overflow the size of Pvd->VolumeId and it can cause a segmentation fault if we are unlucky.

      2) CDFS fails to recover correct volume name for a CD if the label has some spaces into it.
      If the label contains more space, like "MY FIRST DISK", the windows API function GetVolumeInformation() will return only "MY" because CdfsGetPVDData() halts when the first space is found.
      This patch copies the entire label name and then it skips the final spaces, if they exists and now the disk label is displayed correctly into explorer.

      Attachments

        Activity

          People

            fireball fireball
            Carlo Bramix Carlo Bramix
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: