diff --git a/src/net_md5_fmt_plug.c b/src/net_md5_fmt_plug.c index e30d4359c3..9c6f2ecaa1 100644 --- a/src/net_md5_fmt_plug.c +++ b/src/net_md5_fmt_plug.c @@ -275,6 +275,8 @@ static char *prepare(char *fields[10], struct fmt_main *self) { get_ptr(); if (text_in_dynamic_format_already(pDynamicFmt, hash)) return hash; + if (strlen(hash) + TAG_LENGTH + 1 > sizeof(buf)) + return hash; sprintf(buf, "%s%s", FORMAT_TAG, hash); return buf; }