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

Int32x32To64 used with unsigned input values will cause unintentional sign extension

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
      None

      Description

      This list needs to be reviewed:
      https://git.reactos.org/?p=reactos.git&a=search&h=HEAD&st=grep&s=Int32x32To64

      Example issue:

      DWORD dwMilliseconds = xxx;
      LARGE_INTEGER TImeout;
      Timeout.QuadPart = Int32x32To64(dwMilliseconds, -10000);

      This will cause dwMilliseconds to be sign extended, which is incorrect for this scenario. A correct version could be:

      DWORD dwMilliseconds = xxx;
      LARGE_INTEGER TImeout;
      Timeout.QuadPart = dwMilliseconds * -10000LL;

      cc Timo Kreuzer hbelusca

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bug zilla Bug Zilla
                Reporter:
                ThFabba ThFabba
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: