git://git.openafs.org
/
openafs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
viced cap fetchdata len to avoid negative
[openafs.git]
/
src
/
viced
/
afsfileprocs.c
diff --git
a/src/viced/afsfileprocs.c
b/src/viced/afsfileprocs.c
index
04a68b3
..
e6f8f7f
100644
(file)
--- a/
src/viced/afsfileprocs.c
+++ b/
src/viced/afsfileprocs.c
@@
-7027,8
+7027,9
@@
FetchData_RXStyle(Volume * volptr, Vnode * targetptr,
Len = 0;
}
- if (Pos + Len > tlen)
- Len = tlen - Pos; /* get length we should send */
+ if (Pos + Len > tlen) /* get length we should send */
+ Len = ((tlen - Pos) < 0) ? 0 : tlen - Pos;
+
(void)FDH_SEEK(fdP, Pos, 0);
{
afs_int32 high, low;