From 4956f41b8563de63c90777396fb83a64e1747f57 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 4 Dec 2007 21:09:49 +0000 Subject: [PATCH] DEVEL15-largefile-avoid-wraparound-write-to-old-server-20071204 LICENSE IPL10 FIXES 73720 apply analogous check that's in fileserver to clients writing to old servers (cherry picked from commit d13cd42cb4e0b2fe3f91565eac37dc3f3e6d3270) --- src/afs/afs_segments.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/afs/afs_segments.c b/src/afs/afs_segments.c index d9b6e8dac9..dce5ac8498 100644 --- a/src/afs/afs_segments.c +++ b/src/afs/afs_segments.c @@ -92,6 +92,10 @@ afs_StoreMini(register struct vcache *avc, struct vrequest *areq) afs_int32 l1, l2; l1 = avc->m.Length; l2 = tlen; + if ((avc->m.Length > 0x7fffffff) || + (tlen > 0x7fffffff) || + ((0x7fffffff - tlen) < avc->m.Length)) + return EFBIG; code = StartRXAFS_StoreData(tcall, (struct AFSFid *)&avc->fid.Fid,