From 9994cbdc1ced4d7c80f490ffb7c536761a5de8a3 Mon Sep 17 00:00:00 2001 Message-Id: <9994cbdc1ced4d7c80f490ffb7c536761a5de8a3.1718499366.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 22 Dec 1999 15:39:28 +0000 Subject: [PATCH] Fix overflow in dstr_putline. Organization: Straylight/Edgeware From: mdw --- dstr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dstr.c b/dstr.c index d15fba8..4df8f72 100644 --- a/dstr.c +++ b/dstr.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: dstr.c,v 1.12 1999/12/10 23:42:04 mdw Exp $ + * $Id: dstr.c,v 1.13 1999/12/22 15:39:28 mdw Exp $ * * Handle dynamically growing strings * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: dstr.c,v $ + * Revision 1.13 1999/12/22 15:39:28 mdw + * Fix overflow in dstr_putline. + * * Revision 1.12 1999/12/10 23:42:04 mdw * Change header file guard names. * @@ -273,6 +276,7 @@ int dstr_putline(dstr *d, FILE *fp) /* --- Make sure there's some buffer space --- */ if (!left) { + d->len = off; dstr_ensure(d, 1); left = d->sz - off; } -- [mdw]