diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-19 04:00:21 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-19 04:00:21 +0000 |
commit | ce16d9a26df7a3012945ecaa5738cf63110fb5c5 (patch) | |
tree | cfc426d56ebe3dffa802a436357cc7ebc40623c6 | |
parent | 923a3a0e1ce0a89a2e9be85cc224729610092b3f (diff) | |
download | samba-ce16d9a26df7a3012945ecaa5738cf63110fb5c5.tar.gz samba-ce16d9a26df7a3012945ecaa5738cf63110fb5c5.tar.xz samba-ce16d9a26df7a3012945ecaa5738cf63110fb5c5.zip |
fixed line buffer mode in XFILE
thanks to tim for finding this bug
(This used to be commit 91bff7545405ba88bc721f358ccdbf0aac0e3ba6)
-rw-r--r-- | source3/lib/xfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/xfile.c b/source3/lib/xfile.c index 903dfb1ae0..b5710f3a39 100644 --- a/source3/lib/xfile.c +++ b/source3/lib/xfile.c @@ -171,7 +171,7 @@ int x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f) flush a bit more than necessary, but that is harmless */ if (f->buftype == X_IOLBF && f->bufused) { int i; - for (i=size-1; i>=0; i--) { + for (i=(size*nmemb)-1; i>=0; i--) { if (*(i+(const char *)p) == '\n') { x_fflush(f); break; |