mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-11 03:31:36 +00:00
BUG/MINOR: sendmail: The return of vsnprintf is not cleanly tested
The string formatted by vsnprintf may be bigger than the size of the buffer "buf". This case is not tested. This sould be backported to 1.6 and 1.7
This commit is contained in:
parent
cdade94cf5
commit
62c8a21c10
@ -3398,7 +3398,7 @@ void send_email_alert(struct server *s, int level, const char *format, ...)
|
||||
len = vsnprintf(buf, sizeof(buf), format, argp);
|
||||
va_end(argp);
|
||||
|
||||
if (len < 0) {
|
||||
if (len < 0 || len >= sizeof(buf)) {
|
||||
Alert("Email alert [%s] could not format message\n", p->id);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user