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

UniAtaReadLunConfig() wrong/duplicate parameter checking

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: None
    • Component/s: Drivers
    • Labels:

      Description

      In file id_init.cpp at Uniata driver there is a wrong/duplicate parameter checking:

      if(!LunExt->IdentifyData.SectorsPerTrack ||
      !LunExt->IdentifyData.NumberOfCylinders ||
      !LunExt->IdentifyData.SectorsPerTrack)
      {
      //code//
      }

      As you can see !LunExt->IdentifyData.SectorsPerTrack appears duplicated.
      I think this could be the typical copy->paste issue.

      Probably, the author must check this assumption, the code was meant to be:

      if(!LunExt->IdentifyData.SectorsPerTrack ||
      !LunExt->IdentifyData.NumberOfCylinders ||
      !LunExt->IdentifyData.NumberOfHeads)

      I have attached a Patch with this potential fix, so if the fix is correct you have just to commit it in the next awesome UniAta release

      Bug detected by PVS-Studio

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alter-1 Alter
                Reporter:
                vicmarcal victor martinez calvo
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: