[Heimdal-source-changes] [heimdal/heimdal] b3f291: hcrypto: w32crypto crypt provider handle leak

GitHub noreply at github.com
Ons Dec 24 21:50:44 CET 2014


  Branch: refs/heads/master
  Home:   https://github.com/heimdal/heimdal
  Commit: b3f29170a35a8e249cd512db682e7f4092af663e
      https://github.com/heimdal/heimdal/commit/b3f29170a35a8e249cd512db682e7f4092af663e
  Author: Jeffrey Altman <jaltman at secure-endpoints.com>
  Date:   2014-12-24 (Wed, 24 Dec 2014)

  Changed paths:
    M lib/hcrypto/rand-w32.c

  Log Message:
  -----------
  hcrypto: w32crypto crypt provider handle leak

_hc_CryptProvider() returns a global handle to a Win32 Crypt Provider.
If the global handle is NULL, then a handle is allocated.  Unfortunately,
due to a coding mistake the global handle variable, g_cryptprovider, was
never set and a new handle was allocated with each call.

Refactor the function to ensure that the global handle is the value
that is returned.  Use NULL instead of 0 for pointer assignment.

Change-Id: If1ef3aa19cbd1d51860370db24c086e86922ff0d




More information about the Heimdal-source-changes mailing list