Skip to content

fix(apache): remove NULL-returning create_dir_config/merge_dir_config stubs (#96)#154

Merged
s2x merged 1 commit into
mainfrom
fix/apache-96-remove-null-dir-config
May 4, 2026
Merged

fix(apache): remove NULL-returning create_dir_config/merge_dir_config stubs (#96)#154
s2x merged 1 commit into
mainfrom
fix/apache-96-remove-null-dir-config

Conversation

@s2x
Copy link
Copy Markdown
Contributor

@s2x s2x commented May 4, 2026

Summary

  • Remove create_dir_config and merge_dir_config stub functions that returned NULL while being registered as non-NULL function pointers
  • Set both dir-config slots to NULL in the mesi_module struct — Apache's standard convention for modules with no per-directory configuration
  • Eliminates latent NULL-deref risk for any future code calling ap_get_module_config(r->per_dir_config, ...)

Closes #96

… stubs

Both dir-config callbacks returned NULL while being registered as
non-NULL function pointers. This creates a latent NULL-deref risk
for any code calling ap_get_module_config(r->per_dir_config, ...).

Since all directives are RSRC_CONF (server-level only), set both
slots to NULL in the module struct instead — Apache's convention
for modules with no per-directory config.

Closes #96
@s2x s2x merged commit ae02156 into main May 4, 2026
4 checks passed
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.

[apache] create_dir_config and merge_dir_config return NULL — brittle and prevents per-dir config

1 participant