Skip to content

Return NULL when hash context allocation fails - #326

Open
dajiaohuang wants to merge 1 commit into
rhash:masterfrom
dajiaohuang:fix-audit-316-init-allocation
Open

dajiaohuang wants to merge 1 commit into
rhash:masterfrom
dajiaohuang:fix-audit-316-init-allocation

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Fixes #316.

rhash_init_multi now returns NULL when context allocation fails instead of taking the address of a member through a NULL pointer.

Validation: a test preload injects failure into aligned allocation. The base build reports the UBSan null-member access; this build returns NULL without a report (Linux/GCC 13.3). Regression: tests/test_init_alloc_failure.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return NULL when rhash_init_multi allocation fails

1 participant