ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtdaemon.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtdaemon.C (file contents):
Revision 1.10 by root, Sun Dec 25 16:19:34 2005 UTC vs.
Revision 1.11 by root, Wed Jan 11 00:59:58 2006 UTC

56 56
57void rxvt_connection::send (const char *data, int len) 57void rxvt_connection::send (const char *data, int len)
58{ 58{
59 uint8_t s[2]; 59 uint8_t s[2];
60 60
61 if (len > 65535)
62 len = 65535;
63
61 s[0] = len >> 8; s[1] = len; 64 s[0] = len >> 8; s[1] = len;
62 65
63 write (fd, s, 2); 66 write (fd, s, 2);
64 write (fd, data, len); 67 write (fd, data, len);
65} 68}
76 79
77 if (read (fd, s, 2) != 2) 80 if (read (fd, s, 2) != 2)
78 return false; 81 return false;
79 82
80 l = (s[0] << 8) + s[1]; 83 l = (s[0] << 8) + s[1];
81 if (l > 4096) 84 if (l > 65535)
82 return false; 85 return false;
83 86
84 if (len) 87 if (len)
85 *len = l; 88 *len = l;
86 89

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines