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

Wrong set TimeFields->Second in RtlTimeToTimeFields

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Trivial
    • None
    • SDK
    • None

    Description

      wrong:

      TimeFields->Hour = (CSHORT)(SecondsInDay / SECSPERHOUR);
      SecondsInDay = SecondsInDay % SECSPERHOUR;
      TimeFields->Minute = (CSHORT)(SecondsInDay / SECSPERMIN);
      TimeFields->Second = (CSHORT)(SecondsInDay % SECSPERMIN);

      right:

      TimeFields->Hour = (CSHORT)((SecondsInDay + 1) / SECSPERHOUR);
      SecondsInDay = (SecondsInDay + 1) % SECSPERHOUR;
      TimeFields->Minute = (CSHORT)((SecondsInDay + 1) / SECSPERMIN);
      TimeFields->Second = (CSHORT)((SecondsInDay + 1) % SECSPERMIN);

       

      this error using in viruses under windows for antiemulation tricks (some years)

      (checked seconds value past FileTimeToDosDateTime)

      thsi error already present in Wine

      also I educed ~10 (20?) other errors.  planning to send past close this report

      Attachments

        Activity

          People

            Unassigned Unassigned
            Eugeny Vasiliev Eugeny Vasiliev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: