/[Apache-SVN]
ViewVC logotype

Revision 1916298


Jump to revision: Previous Next
Author: ylavic
Date: Thu Mar 14 14:38:36 2024 UTC (3 months ago)
Changed paths: 1
Log Message:
mod_rewrite: disambiguate select_random_value_part().

gcc-13's -fsanitize=undefined finds:

    mod_rewrite.c|1702 col 37| error: '%s' directive argument is null [-Werror=format-overflow=]
    ||  1701 |             value = select_random_value_part(r, value);
    ||  1702 |             rewritelog((r, 5, NULL, "randomly chosen the subvalue `%s'",value));
    ||       |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

because it's not clear from select_random_value_part() whether it can return NULL or not.
Rewrite the function so that it's clearer/simpler.



Changed paths

Path Details
Directoryhttpd/httpd/trunk/modules/mappers/mod_rewrite.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26