This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit 8f86fed
committed
Fix "invalid handle" failure in X509Cert's copy ctor on macOS
The certificate being copied from could be eligible for collection after its raw IntPtr handle is accessed but before the copy ctor actually gets around to reading from it, leading to use after free and recycling problems. The fix is simply to ensure the other certificate can't be collected until after we're done using the raw handle.1 parent e1c0bf1 commit 8f86fed
File tree
1 file changed
+3
-1
lines changed- src/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.OSX
1 file changed
+3
-1
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
0 commit comments