comparison src/lib-mail/message-parser.c @ 265:d0ba9a65891c HEAD

message_parse_header() went to infinite loop with partial header
author Timo Sirainen <tss@iki.fi>
date Tue, 17 Sep 2002 04:49:45 +0300
parents 62058959536a
children 3dcc2275b4ca
comparison
equal deleted inserted replaced
264:483f4afe5da2 265:d0ba9a65891c
331 331
332 if (ret < 0) { 332 if (ret < 0) {
333 /* EOF, but we may still have something in buffer. 333 /* EOF, but we may still have something in buffer.
334 this is needed only when there's no message body */ 334 this is needed only when there's no message body */
335 msg = io_buffer_get_data(inbuf, &size); 335 msg = io_buffer_get_data(inbuf, &size);
336 if (size == 0) 336 if (size == startpos)
337 break; 337 break;
338 } 338 }
339 339
340 for (i = startpos; i < size; i++) { 340 for (i = startpos; i < size; i++) {
341 if (msg[i] == ':' && colon_pos == UINT_MAX) { 341 if (msg[i] == ':' && colon_pos == UINT_MAX) {