diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 6acbf127a5..da04b22815 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -6676,10 +6676,13 @@ FetchData_RXStyle(Volume * volptr, Vnode * targetptr, tlen = FDH_SIZE(fdP); ViceLog(25, ("FetchData_RXStyle: file size %llu\n", (afs_uintmax_t) tlen)); - if ((tlen < 0) || (Pos > tlen)) { + if (tlen < 0) { FDH_CLOSE(fdP); return EIO; } + if (Pos > tlen) { + Len = 0; + } if (Pos + Len > tlen) Len = tlen - Pos; /* get length we should send */