$NetBSD: patch-aa,v 1.1 2002/11/30 15:13:26 taca Exp $ --- mbstring.c.orig Thu Aug 1 14:47:56 2002 +++ mbstring.c @@ -1031,14 +1031,19 @@ php_mbstr_encoding_handler(zval *arg, ch var = php_strtok_r(res, separator, &strtok_buf); while (var) { val = strchr(var, '='); - val_list[n] = var; - len_list[n] = php_url_decode(var, strlen(var)); - n++; if (val) { /* have a value */ + len_list[n] = php_url_decode(var, val-var); + val_list[n] = var; + n++; + *val++ = '\0'; val_list[n] = val; len_list[n] = php_url_decode(val, strlen(val)); } else { + len_list[n] = php_url_decode(var, strlen(var)); + val_list[n] = var; + n++; + val_list[n] = ""; len_list[n] = 0; } @@ -1375,7 +1380,7 @@ PHP_FUNCTION(mb_parse_str) str_list[n] = var; len_list[n] = php_url_decode(var, strlen(var)); n++; - str_list[n] = NULL; + str_list[n] = ""; len_list[n] = 0; } n++;