[OpenSmalltalk/opensmalltalk-vm] ca44af: fixup: my incorrect fix of SecurityPlugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] ca44af: fixup: my incorrect fix of SecurityPlugin

Eliot Miranda-3
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: ca44afe967e93de2aa4b879878ece606d7c7d24e
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ca44afe967e93de2aa4b879878ece606d7c7d24e
  Author: Nicolas Cellier <[hidden email]>
  Date:   2019-01-04 (Fri, 04 Jan 2019)

  Changed paths:
    M platforms/win32/plugins/SecurityPlugin/sqWin32Security.c

  Log Message:
  -----------
  fixup: my incorrect fix of SecurityPlugin

This form of MultiByteToWideChar with prescribed source string length does not copy the terminating NULL
(unless the original string has a terminating NULL and we pass strlen()+1)
By passing MAX_PATH-1 as target string length, we made a provision for this NULL.
But it is wrong to set the terminating NULL a priori (other than memset the whole string to zero)
We must setup the NULL a posteriori once we know the length.
[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.