Index: qparse.c =================================================================== --- qparse.c (revision 28948) +++ qparse.c (revision 28949) @@ -89,6 +89,8 @@ allocated_ = 0; argv_allocated = &allocated_; } + else + argv = *argv_ret; argc = 0; state = qp_normal; @@ -95,7 +97,6 @@ if (buffer == NULL) { buff_len = 128; - buff_used = 0; buff = malloc(buff_len); } else { @@ -102,6 +103,7 @@ buff_len = *buffer_alloced; buff = *buffer; } + buff_used = 0; for(s = input; *s != '\0'; s++) { switch (state) {