Skip to content

Commit

Permalink
Use ap_os_is_path_absolute() to make it portable.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915400 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jfclere committed Jan 25, 2024
1 parent e5b800e commit 88afb52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/slotmem/mod_slotmem_shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static int slotmem_filenames(apr_pool_t *pool,
const char *fname = NULL, *pname = NULL;

if (slotname && *slotname && strcasecmp(slotname, "none") != 0) {
if (slotname[0] != '/') {
if (!ap_os_is_path_absolute(pool, slotname)) {
/* Each generation needs its own file name. */
int generation = 0;
ap_mpm_query(AP_MPMQ_GENERATION, &generation);
Expand All @@ -109,7 +109,7 @@ static int slotmem_filenames(apr_pool_t *pool,

if (persistname) {
/* Persisted file names are immutable... */
if (slotname[0] != '/') {
if (!ap_os_is_path_absolute(pool, slotname)) {
pname = apr_pstrcat(pool, DEFAULT_SLOTMEM_PREFIX,
slotname, DEFAULT_SLOTMEM_SUFFIX,
DEFAULT_SLOTMEM_PERSIST_SUFFIX,
Expand Down

0 comments on commit 88afb52

Please sign in to comment.