about summary refs log tree commit diff
path: root/src/libutil/serialise.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2018-05-22T09·31+0200
committerGitHub <noreply@github.com>2018-05-22T09·31+0200
commit9064dd2f4daab34718c0143be235e8eb95c671bd (patch)
tree71d65f60a2cdc742ac741e7be384ce57a39dc229 /src/libutil/serialise.cc
parent966407bcf1cf86de508b20fef43cffb81d8a87dc (diff)
parentb08923b4a06cf585b038e73cc277fccff8ce9b58 (diff)
Merge pull request #2173 from dtzWill/fix/serialise-read-unbuffered
serialise: fix buffer size used, hide method for internal use only
Diffstat (limited to 'src/libutil/serialise.cc')
-rw-r--r--src/libutil/serialise.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc
index 33ae1ea389d7..21803edd056a 100644
--- a/src/libutil/serialise.cc
+++ b/src/libutil/serialise.cc
@@ -133,7 +133,7 @@ size_t FdSource::readUnbuffered(unsigned char * data, size_t len)
     ssize_t n;
     do {
         checkInterrupt();
-        n = ::read(fd, (char *) data, bufSize);
+        n = ::read(fd, (char *) data, len);
     } while (n == -1 && errno == EINTR);
     if (n == -1) { _good = false; throw SysError("reading from file"); }
     if (n == 0) { _good = false; throw EndOfFile("unexpected end-of-file"); }