summaryrefslogtreecommitdiff
path: root/textproc/groff/patches/patch-af
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/groff/patches/patch-af')
-rw-r--r--textproc/groff/patches/patch-af22
1 files changed, 22 insertions, 0 deletions
diff --git a/textproc/groff/patches/patch-af b/textproc/groff/patches/patch-af
new file mode 100644
index 00000000000..94acfca62fd
--- /dev/null
+++ b/textproc/groff/patches/patch-af
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.1 2004/05/08 03:21:57 jschauma Exp $
+
+--- ./src/preproc/html/pre-html.cpp.orig Fri May 7 17:51:50 2004
++++ ./src/preproc/html/pre-html.cpp Fri May 7 17:52:08 2004
+@@ -263,7 +263,7 @@
+ n = vsnprintf (p, size, fmt, ap);
+ va_end(ap);
+ /* If that worked, return the string. */
+- if (n > -1 && n < size) {
++ if (n > -1 && n < size-1) {
+ if (size > n+1) {
+ np = strsave(p);
+ free(p);
+@@ -272,8 +272,6 @@
+ return p;
+ }
+ /* Else try again with more space. */
+- if (n > -1) /* glibc 2.1 */
+- size = n+1; /* precisely what is needed */
+ else /* glibc 2.0 */
+ size *= 2; /* twice the old size */
+ if ((np = (char *)realloc (p, size)) == NULL) {