summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-10-16 19:58:59 +0200
committerdefault <nobody@localhost>2022-10-16 19:58:59 +0200
commit01ffb92e5ef90743b02d3ea1062719406373c6d8 (patch)
tree8eab28017fe1985984a9ea369d6f974f4327f9e8
parent395f80bdc40115087e8e4eb8fdbed8520df54863 (diff)
Backport from xs.
-rw-r--r--xs_io.h4
-rw-r--r--xs_version.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/xs_io.h b/xs_io.h
index ca243ad..1379a34 100644
--- a/xs_io.h
+++ b/xs_io.h
@@ -84,6 +84,10 @@ d_char *xs_read(FILE *f, int *sz)
size -= r;
}
+ /* null terminate, just in case it's treated as a string */
+ s = xs_realloc(s, rdsz + 1);
+ s[rdsz] = '\0';
+
*sz = rdsz;
return s;
diff --git a/xs_version.h b/xs_version.h
index d810fd8..c408db0 100644
--- a/xs_version.h
+++ b/xs_version.h
@@ -1 +1 @@
-/* 65d893d17731d4cc1bfeeff6e5395e59fc4f7875 */
+/* d1bebf4154dd42f20c981f65325b33eadacfb1d8 */