Project

General

Profile

mod_cgi.c.patch

patch to fix the bug -- marc - Anonymous, 2008-07-06 02:52

View differences:

mod_cgi.c.new 2008-07-05 22:47:05.000000000 -0400
948 948
                               buffer_prepare_append(p->tmp_buf, ds->key->used + 2);
949 949

  
950 950
                               for (j = 0; j < ds->key->used - 1; j++) {
951
                                       p->tmp_buf->ptr[p->tmp_buf->used++] =
952
                                               isalpha((unsigned char)ds->key->ptr[j]) ?
953
                                               toupper((unsigned char)ds->key->ptr[j]) : '_';
951
                                       char cr = '_';
952
                                       if (light_isalpha(ds->key->ptr[j])) {
953
                                               /* upper-case */
954
                                               cr = ds->key->ptr[j] & ~32;
955
                                       } else if (light_isdigit(ds->key->ptr[j])) {
956
                                               /* copy */
957
                                               cr = ds->key->ptr[j];
958
                                       }
959
                                       p->tmp_buf->ptr[p->tmp_buf->used++] = cr;
954 960
                               }
955 961
                               p->tmp_buf->ptr[p->tmp_buf->used++] = '\0';