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

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • Build System
    • 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 thephysicist hbelusca

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: