message-size.c revision c31661baf87b506c2a90a1fca02968cf82e448bb
/* Copyright (c) 2002-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "message-parser.h"
#include "message-size.h"
bool *has_nuls)
{
const unsigned char *msg;
int ret = 0;
missing_cr_count = 0; startpos = 0;
if (msg[i] != '\n') {
continue;
}
/* missing CR */
}
/* no headers at all */
break;
}
/* \n\n or \n\r\n - end of headers */
break;
}
}
if (i < size) {
/* end of header */
startpos = i+1;
break;
}
/* leave the last two characters, they may be \r\n */
}
if (input->stream_errno != 0)
ret = -1;
return ret;
}
bool *has_nuls)
{
const unsigned char *msg;
int ret = 0;
missing_cr_count = 0;
if (msg[0] == '\n')
do {
for (i = 1; i < size; i++) {
if (msg[i] > '\n')
continue;
if (msg[i] == '\n') {
/* missing CR */
}
/* increase after making sure we didn't break
at virtual \r */
} else if (msg[i] == '\0') {
}
}
/* leave the last character, it may be \r */
if (input->stream_errno != 0)
ret = -1;
body->physical_size++;
return ret;
}
const struct message_size *src)
{
}