]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Added assert to Solaris sendfile() return value.
authorTimo Sirainen <tss@iki.fi>
Mon, 7 Sep 2015 22:20:51 +0000 (01:20 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 7 Sep 2015 22:20:51 +0000 (01:20 +0300)
src/lib/sendfile-util.c

index 6a944ce2559e694fbd9dfdf0464f5956e06c4e72..c9cff1e47d9eab5bc36c2a72c5243bc70707a6f2 100644 (file)
@@ -127,6 +127,7 @@ ssize_t safe_sendfile(int out_fd, int in_fd, uoff_t *offset, size_t count)
                }
        }
        *offset = (uoff_t)s_offset;
+       i_assert(ret < 0 || (size_t)ret <= count);
        return ret;
 }