PrintChars(SC_LOG_DEBUG, "BASE64 DECODED (bvremain)",
state->data_chunk + state->data_chunk_len, remdec);
- /* Track decoded length */
- state->stack->top->data->decoded_body_len += remdec;
-
- /* Update length */
state->data_chunk_len += remdec;
+
/* If data chunk buffer is now full, then clear */
if (DATA_CHUNK_SIZE - state->data_chunk_len < ASCII_BLOCK) {
PrintChars(SC_LOG_DEBUG, "BASE64 DECODED (line)",
state->data_chunk + state->data_chunk_len, numDecoded);
- /* Track decoded length */
- state->stack->top->data->decoded_body_len += numDecoded;
- /* Update length */
state->data_chunk_len += numDecoded;
if ((int)(DATA_CHUNK_SIZE - state->data_chunk_len) < 0) {
if (c != '=') {
state->data_chunk[state->data_chunk_len] = c;
state->data_chunk_len++;
- entity->decoded_body_len += 1;
/* Add CRLF sequence if end of line, unless its a partial line */
if (remaining == 1 && state->current_line_delimiter_len > 0) {
memcpy(state->data_chunk + state->data_chunk_len, CRLF, EOL_LEN);
state->data_chunk_len += EOL_LEN;
- entity->decoded_body_len += EOL_LEN;
}
} else if (remaining > 1) {
/* If last character handle as soft line break by ignoring,
state->data_chunk[state->data_chunk_len] = val;
state->data_chunk_len++;
- entity->decoded_body_len++;
/* Add CRLF sequence if end of line, unless for partial lines */
if (remaining == 3 && state->current_line_delimiter_len > 0) {
memcpy(state->data_chunk + state->data_chunk_len,
CRLF, EOL_LEN);
state->data_chunk_len += EOL_LEN;
- entity->decoded_body_len += EOL_LEN;
}
/* Account for extra 2 characters in 3-characted QP
SCLogDebug("Processing body line");
- /* Track length */
- entity->body_len += (len + state->current_line_delimiter_len);
-
/* Process base-64 content if enabled */
MimeDecConfig *mdcfg = MimeDecGetConfig();
if (mdcfg != NULL && mdcfg->decode_base64 &&
typedef struct MimeDecEntity {
MimeDecField *field_list; /**< Pointer to list of header fields */
MimeDecUrl *url_list; /**< Pointer to list of URLs */
- uint32_t body_len; /**< Length of body (prior to any decoding) */
- uint32_t decoded_body_len; /**< Length of body after decoding */
uint32_t header_flags; /**< Flags indicating header characteristics */
uint32_t ctnt_flags; /**< Flags indicating type of content */
uint32_t anomaly_flags; /**< Flags indicating an anomaly in the message */