Aucbvax.4062 net.2bsd-bugs utzoo!decvax!ucbvax!dist2 Sat Sep 26 03:56:41 1981 FIXED: bug in src/delivermail/vax-mail.c From ucsfcgl!tef Tue Sep 8 19:07:53 1981 To: ucbvax!v7bugs Subject: bug in BTL v7 mail If you try to send someone a file that's greater than 32767 bytes, the Bell v7 mail program will do funny things; most probably it will just drop all those bytes on the floor somewhere. (Ever try to pick up 32767 bytes off the floor???) The fix is simple: In the procedure copylet(), change the declaraction of ``k'' from an int to a long. Quite right. In the case of 2.8BSD, the fix should be applied to the program ~/src/delivermail/vax-mail.c: diff vax-mail.c.old vax-mail.c 371c371,372 < { int ch, k; --- > { int ch; > long k; 374c375 < while(k-- > 1 && (ch=fgetc(tmpf))!='\n') --- > while(k-- > 1L && (ch=fgetc(tmpf))!='\n') 382c383 < while(k-->1) --- > while(k-->1L)