Mail: fixed possible uninitialized memory access.

Found by Valgrind.
This commit is contained in:
Maxim Dounin 2013-06-05 19:44:23 +04:00
parent 5636b1b6ab
commit d53b56bdf5

View file

@ -842,6 +842,10 @@ ngx_mail_auth_parse(ngx_mail_session_t *s, ngx_connection_t *c)
}
#endif
if (s->args.nelts == 0) {
return NGX_MAIL_PARSE_INVALID_COMMAND;
}
arg = s->args.elts;
if (arg[0].len == 5) {