json-email: fix coverity alert

The code was not correct and coverity did detect a potential
overflow problem that should not happen because of the structure
of md5 string and of format.
pull/1703/head
Eric Leblond 10 years ago
parent dc2c896781
commit f8b6768d05

@ -140,7 +140,7 @@ static void JsonEmailLogJSONMd5(OutputJsonEmailCtx *email_ctx, json_t *js, SMTPT
field = MimeDecFindField(entity, "subject");
if (field != NULL) {
unsigned char md5[MD5_LENGTH];
char smd5[2 * MD5_LENGTH + 1];
char smd5[256];
char *value = BytesToString((uint8_t *)field->value , field->value_len);
if (value) {
size_t i,x;

Loading…
Cancel
Save