jborean93 / pyspnego

Python SPNEGO authentication library
MIT License
52 stars 11 forks source link

Fix Heap Allocation Errors on Windows #41

Closed jborean93 closed 2 years ago

jborean93 commented 2 years ago

Fix errors when running with heap allocation checks on Windows. This moves all the management of the SecBuffer objects to the Python code to keep the Cython management simple. It also exposed some of the inefficiencies that are in place where memory was copied to avoid it mutating which can be addressed in a separate PR.

Fixes: https://github.com/jborean93/pyspnego/issues/40

codecov[bot] commented 2 years ago

Codecov Report

Merging #41 (62f0730) into main (d6e33a2) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #41   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files          30       30           
  Lines        4308     4342   +34     
=======================================
+ Hits         4307     4341   +34     
  Misses          1        1           
Flag Coverage Δ
macOS 93.34% <4.76%> (-0.74%) :arrow_down:
py3.10 99.95% <100.00%> (+<0.01%) :arrow_up:
py3.6 99.97% <100.00%> (+<0.01%) :arrow_up:
py3.7 99.95% <100.00%> (+<0.01%) :arrow_up:
py3.8 99.95% <100.00%> (+<0.01%) :arrow_up:
py3.9 99.95% <100.00%> (+<0.01%) :arrow_up:
ubuntu 95.82% <4.76%> (-0.76%) :arrow_down:
windows 94.28% <100.00%> (+0.04%) :arrow_up:
x64 99.97% <100.00%> (+<0.01%) :arrow_up:
x86 94.26% <100.00%> (+0.04%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/spnego/_sspi.py 100.00% <100.00%> (ø)
src/spnego/_version.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d6e33a2...62f0730. Read the comment docs.