ossp-pkg/var/var.c 1.78 -> 1.79
--- var.c 2002/03/04 13:12:23 1.78
+++ var.c 2002/03/06 10:04:29 1.79
@@ -249,7 +249,8 @@
}
/* append the data at the end of the current buffer. */
- memcpy((char *)output->end, data, len);
+ if (len > 0)
+ memcpy((char *)output->end, data, len);
output->end += len;
*((char *)output->end) = NUL;
return 1;
@@ -905,6 +906,7 @@
}
/* Match the pattern and create the result string in the tmp buffer. */
+ tokenbuf_append(&tmp, "", 0);
for (p = mydata.begin; p != mydata.end; ) {
if (p == mydata.begin || p[-1] == '\n')
regexec_flag = 0;
|
|