chiark
/
gitweb
/
~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3842ad
)
Fix overflow in dstr_putline.
author
mdw
<mdw>
Wed, 22 Dec 1999 15:39:28 +0000
(15:39 +0000)
committer
mdw
<mdw>
Wed, 22 Dec 1999 15:39:28 +0000
(15:39 +0000)
dstr.c
patch
|
blob
|
blame
|
history
diff --git
a/dstr.c
b/dstr.c
index d15fba8355780f1f54cb3aa82cacdc2f17a6bc5d..4df8f7238a4d8ea3e2c127e00787dca78280d946 100644
(file)
--- a/
dstr.c
+++ b/
dstr.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: dstr.c,v 1.1
2 1999/12/10 23:42:04
mdw Exp $
+ * $Id: dstr.c,v 1.1
3 1999/12/22 15:39:28
mdw Exp $
*
* Handle dynamically growing strings
*
*
* Handle dynamically growing strings
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: dstr.c,v $
/*----- 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.
*
* 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) {
/* --- Make sure there's some buffer space --- */
if (!left) {
+ d->len = off;
dstr_ensure(d, 1);
left = d->sz - off;
}
dstr_ensure(d, 1);
left = d->sz - off;
}