| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Hi @jimjag, @mxamin, @bgaifullin and @jonathangreen, Could you review this PR? My product relies on python3-saml and can’t upgrade to Python 3.13 due to a build failure in PyXmlSec_ClearReplacedNodes. This PR fixes the pointer mismatch that Python 3.13 flags. Thank you in advance! For reference: PR Review by Claude 3.7 This PR corrects improper pointer handling in the node replacement cleanup logic. The fix properly aligns the variable type with its usage in the function. I've verified that the fixed code correctly manages memory for replaced XML nodes during encryption/decryption operations, preventing potential use-after-free or memory leak scenarios. The original double-pointer declaration could have caused undefined behavior during Py_DECREF operations. The change is localized to cleanup operations and won't affect the encryption/decryption logic itself. Safe to merge. |
Sorry, something went wrong.
|
Bump, have the same issue, same error, and am also relying on python3-saml. |
Sorry, something went wrong.
There was a problem hiding this comment.
@haya4ux this fix looks reasonable to me!
I'm not much help getting it merged though, I've been contributing fixes for issues I've faced, but I'm not a maintainer on this repo.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I’ve encountered a build failure with Python 3.13 caused by a type mismatch in the PyXmlSec_ClearReplacedNodes function. The issue arises because the variable elem is declared as a pointer-to-pointer (PyXmlSec_LxmlElementPtr*) instead of the correct pointer type (PyXmlSec_LxmlElementPtr). This misdeclaration leads to an incorrect argument being passed to Py_DECREF, which Python 3.13 now rejects due to its stricter type checking.
Changes:
• Changed the declaration of elem from PyXmlSec_LxmlElementPtr* elem; to PyXmlSec_LxmlElementPtr elem;
• Updated the cast accordingly in the call to PyXmlSec_elementFactory
Benefits:
• Resolves build errors on Python 3.13, ensuring compatibility with the latest Python release.
• Minimal and safe change that aligns with the intended design of the code.
Thank you for your continued work on this project. Please let me know if you have any questions or need further modifications.