comparison plugins/gaim-remote/remote-socket.c @ 10899:1e6bdc7175e9

[gaim-migrate @ 12619] Bits'n'pieces: Don't allow gaim-remote "clones" to knock gaim out by specifying a big packet length. Correctly bound the point sizes in gtkimhtml & yahoo Fix up some code in MSN that isn't actually being used, just in case someone comes along and submits a patch that would use it. Don't try writing to the server in MSN if you're not actually connected Fix message flags in SILC committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 05 May 2005 13:09:28 +0000
parents 5364929fad9b
children
comparison
equal deleted inserted replaced
10898:cfacc0de0d94 10899:1e6bdc7175e9
140 g_free(p); 140 g_free(p);
141 return NULL; 141 return NULL;
142 } 142 }
143 143
144 if (p->length) { 144 if (p->length) {
145 data = g_malloc(p->length); 145 data = g_try_malloc(p->length);
146 146
147 if ((read(fd, data, p->length)) != p->length) { 147 if ((data == NULL) || (read(fd, data, p->length)) != p->length) {
148 g_free(p); 148 g_free(p);
149 return NULL; 149 return NULL;
150 } 150 }
151 } 151 }
152 152