Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

DO NOT REPLY [Bug 14147] - patch for filename truncation bug in ap_directory_walk

From: <bugzilla(at)apache.org>
Date: Thu Oct 31 2002 - 22:40:24 EST


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14147>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14147

patch for filename truncation bug in ap_directory_walk

  • Additional Comments From wrowe@apache.org 2002-11-01 03:40 -------

  Still makes no sense.

        do {
            int res;
            char *seg_name;
            char *delim;
            int temp_slash=0;

            /* We have no trailing slash, but we sure would appreciate one.
             * However, we don't want to append a / our first time through.
             */
            if ((seg > startseg) && r->filename[filename_len-1] != '/') {
                r->filename[filename_len++] = '/';
                r->filename[filename_len] = 0;
                temp_slash=1;

}
[...] /* That temporary trailing slash was useful, now drop it. */ if (temp_slash) { temp_slash = 0; AP_ASSERT(r->filename[filename_len-1] == '/'); r->filename[--filename_len] = '\0';
}

There is no way around this code without resetting temp_slash to zero at the beginning of the loop...

...UNLESS the optimizer has optimized away all but the initial assignment to the 0 initial value, never again to reset it on the next iteration through the do {} loop.

Does this make sense as the possible scenario? Can you check this Dan?

Bill



To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org Received on Fri Nov 01 03:39:24 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 16:44:01 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library