Menu

#1 segfault in mod_blosxom 0.05 with Apache 1.3.26

open
nobody
None
5
2003-03-30
2003-03-30
No

mod_blosxom 0.05 with Apache 1.3.26 and the "sample"
blog directory segfaults repeatedly on my system
(Debian Linux 3.0 (Woody)), somewhere around the point
where it builds the output page.

By performing a binary search between mod_blosxom 0.04
(which didn't crash) and mod_blosxom 0.05 (which does
crash every time on my system), I found this was the
critical change to back out:

-=- cut here -=-
--- mod_blosxom.c-broken-2003-03-30 Sun Mar 30
23:13:25 2003
+++ mod_blosxom.c Sun Mar 30 23:57:42 2003
@@ -498,7 +498,7 @@
ap_table_set(template, "blog_title", cfg->title);
ap_table_set(template, "blog_description",
cfg->description);
ap_table_set(template, "blog_language",
cfg->language);
- uri = ap_pstrcat(r->pool, r->uri);
+ uri = ap_pstrdup(r->pool, r->uri);
uri[strlen(uri) - strlen(r->path_info)] = '\0';
if (subblog != NULL)
uri = ap_make_full_path(r->pool, uri, subblog);
-=- cut here -=-

If ap_pstrcat() is used, then it will crash repeatedly
on my system. If ap_pstrdup() is used then it works.
0.04 used ap_pstrdup(). 0.05 uses ap_pstrcat for
reasons I do not understand.

If ap_pstrcat() must be used, then more documentation
explaining why is required and the segmentation
violations (on at least some systems) need to be resolved.

Ewen

Discussion


Log in to post a comment.

MongoDB Logo MongoDB