[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 3e5161: fixup: skip only 18 WCHAR if keyName begins with \...

GitHub noreply at github.com
Wed Jan 2 14:10:57 UTC 2019


  Branch: refs/heads/WIN64_UNICODE
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 3e51616a56a0ef49b7c67a580db0f0fbaaea588f
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/3e51616a56a0ef49b7c67a580db0f0fbaaea588f
  Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
  Date:   2019-01-02 (Wed, 02 Jan 2019)

  Changed paths:
    M platforms/win32/vm/sqWin32Main.c

  Log Message:
  -----------
  fixup: skip only 18 WCHAR if keyName begins with \\registry\\machine

Note that keyName was declared char * in the original code.
But now it is WCHAR*, so keyName+18 already does the right thing (skip 18 char) while modified code would now skip 36!
Note that original code was using memcpy for this case of overlapping memory which is BAD and eventually UB.
[skip travis]



      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Vm-dev mailing list