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

[PATCH]Fix EqualFamilyInfo function logic

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 0.4.6
    • Component/s: Win32SS
    • Labels:
    • Module:
    • Sprint:
      July 2017

      Description

      The following patch tries to fix a couple of issues in EqualFamilyInfo, however seems I am missing (or not understanding fully the objective of the API).

      1) Remove pointer checks against NULL.
      plog->elfStyle nor plog->elfStyle will ever be NULL since they are an address in memory already allocated.

      2) Remove the check
      if ((pLog1->elfStyle != NULL) != (pLog2->elfStyle != NULL)) as a whole.

      The only reasonable approach would be:
      if ((pLog1->elfStyle) != (pLog2->elfStyle))
      However this checks if elfStyle address pointed from pLog1 is exactly the same address pointed by elfStyle in pLog2, which I don't think is the objective here. Iiuc the idea is to compare if both pLogX are having the same information but not the same pointers.

      Freetype.c patch fixes this issue. Please review the expected logic.

      ------
      On the other hand I don't get why RtlInitUnicodeString are needed at all. Seems much more effficient to use _wcsicmp which performs case-insensitive comparisons directly by using directly the pointer.

      Freetype2.c patch uses this other approach.

      cc Katayama Hirofumi MZ

      CID 1411971

        Attachments

          Activity

            People

            • Assignee:
              learn_more Mark Jansen
              Reporter:
              vicmarcal victor martinez calvo
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: