- while(*q != ';') q++;
- param_value_len = (q - (p + mp->namelen));
- param_value = (uschar *)malloc(param_value_len+1);
- memset(param_value,0,param_value_len+1);
- q = p + mp->namelen;
- Ustrncpy(param_value, q, param_value_len);
+ while(*q && *q != ';') /* ; terminates */
+ {
+ if (*q == '"')
+ {
+ q++; /* skip leading " */
+ while(*q && *q != '"') /* which protects ; */
+ param_value = string_cat(param_value, &size, &ptr, q++, 1);
+ if (*q) q++; /* skip trailing " */
+ }
+ else
+ param_value = string_cat(param_value, &size, &ptr, q++, 1);
+ }
+ param_value[ptr++] = '\0';
+ param_value_len = ptr;
+