OSDN Git Service

* Bug Fix.
authorkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Mon, 22 Sep 2008 15:56:31 +0000 (15:56 +0000)
committerkonn <konn@1a406e8e-add9-4483-a2c8-d8cac5b7c224>
Mon, 22 Sep 2008 15:56:31 +0000 (15:56 +0000)
    - if parameter name is null.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/RELEASE_0_12_0@3205 1a406e8e-add9-4483-a2c8-d8cac5b7c224

src/mod_chxj.c

index a64d447..9a70419 100644 (file)
@@ -454,6 +454,7 @@ chxj_convert_input_header(request_rec *r,chxjconvrule_entry *entryp)
 
     name  = apr_strtok(pair, "=", &vstate);
     value = apr_strtok(NULL, "=", &vstate);
+    if (! name) continue;
     if (strcasecmp(name, CHXJ_COOKIE_NOUPDATE_PARAM) == 0 || strcasecmp(name, chxj_url_encode(r->pool, CHXJ_COOKIE_NOUPDATE_PARAM)) == 0) {
       DBG(r, "found cookie no update parameter");
       no_update_flag++;
@@ -480,6 +481,7 @@ chxj_convert_input_header(request_rec *r,chxjconvrule_entry *entryp)
 
     name  = apr_strtok(pair, "=", &vstate);
     value = apr_strtok(NULL, "=", &vstate);
+    if (! name) continue;
     if (strncasecmp(name, "_chxj", 5) != 0 && strncasecmp(name, "%5Fchxj", sizeof("%5Fchxj")-1) != 0) {
       if (strlen(result) != 0) 
         result = apr_pstrcat(r->pool, result, "&", NULL);
@@ -604,6 +606,7 @@ chxj_input_convert(
 
     name  = apr_strtok(pair, "=", &vstate);
     value = apr_strtok(NULL, "=", &vstate);
+    if (! name) continue;
     if (strcasecmp(name, CHXJ_COOKIE_NOUPDATE_PARAM) == 0 || strcasecmp(name, chxj_url_encode(r->pool, CHXJ_COOKIE_NOUPDATE_PARAM)) == 0) {
       DBG(r, "found cookie no update parameter");
       no_update_flag++;
@@ -622,6 +625,7 @@ chxj_input_convert(
 
     name  = apr_strtok(pair, "=", &vstate);
     value = apr_strtok(NULL, "=", &vstate);
+    if (! name) continue;
     if (strncasecmp(name, "_chxj", 5) != 0 && strncasecmp(name, "%5Fchxj", sizeof("%5Fchxj")-1) != 0) {
       if (strlen(result) != 0) 
         result = apr_pstrcat(r->pool, result, "&", NULL);