]> granicus.if.org Git - php/commitdiff
Fix startup crash
authorYasuo Ohgaki <yohgaki@php.net>
Thu, 10 Jan 2002 12:08:39 +0000 (12:08 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Thu, 10 Jan 2002 12:08:39 +0000 (12:08 +0000)
# Sascha, thanks for fixing poor patch :)
# mm save handler does not work regardlress of
# save path patch or not for some reason.

ext/session/mod_mm.c

index 70e99cc2130cf9119c10a171722be6da2fbdad91..bb77926aa06023ddb141b36d0318fea35e31cb4d 100644 (file)
@@ -259,8 +259,10 @@ PHP_MINIT_FUNCTION(ps_mm)
 
        memcpy(ps_mm_path, PS(save_path), len + 1);
 
-       if (len > 0 && ps_mm_path[len - 1] != DEFAULT_DIR_SEPARATOR)
-               strcat(ps_mm_path, DEFAULT_DIR_SEPARATOR);
+       if (len > 0 && ps_mm_path[len - 1] != DEFAULT_SLASH) {
+               ps_mm_path[len] = DEFAULT_SLASH;
+               ps_mm_path[len+1] = '\0';
+       }
 
        strcat(ps_mm_path, PS_MM_FILE);