summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/libs/obsdcompat/README4
-rw-r--r--Build/source/libs/obsdcompat/bsd-asprintf.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/Build/source/libs/obsdcompat/README b/Build/source/libs/obsdcompat/README
index 0ed8c5191c7..66a97645c29 100644
--- a/Build/source/libs/obsdcompat/README
+++ b/Build/source/libs/obsdcompat/README
@@ -1,9 +1,9 @@
-OpenBSD-Compat for pdfTeX v0.2
+OpenBSD-Compat for pdfTeX v0.3
==============================
$Id$
Herein is a (heavily butchered) version of the openbsd-compat "library" of
-openssh 4.6 for use with pdfTeX. All files have their respective copyrights and
+openssh 5.0 for use with pdfTeX. All files have their respective copyrights and
licenses (either BSD or public domain). Check them for license etc.
Please send bug reports, offers of help, etc. to martin@pdftex.org
diff --git a/Build/source/libs/obsdcompat/bsd-asprintf.c b/Build/source/libs/obsdcompat/bsd-asprintf.c
index 00fa0dfd8a7..3368195d443 100644
--- a/Build/source/libs/obsdcompat/bsd-asprintf.c
+++ b/Build/source/libs/obsdcompat/bsd-asprintf.c
@@ -55,6 +55,7 @@ vasprintf(char **str, const char *fmt, va_list ap)
if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */
*str = string;
} else if (ret == INT_MAX || ret < 0) { /* Bad length */
+ free(string);
goto fail;
} else { /* bigger than initial, realloc allowing for nul */
len = (size_t)ret + 1;