mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 23:35:32 +02:00
MDEV-8673 - [PATCH] Missing Sanity Check for strndup() in MariaDB 10.0.2x
Contributed by Bill Parker. Added check for strndup() return value.
This commit is contained in:
parent
173e486950
commit
c69cf93bfb
1 changed files with 2 additions and 1 deletions
|
|
@ -98,7 +98,8 @@ static int conv(int n, const struct pam_message **msg,
|
|||
if (pkt_len < 0)
|
||||
return PAM_CONV_ERR;
|
||||
/* allocate and copy the reply to the response array */
|
||||
(*resp)[i].resp = strndup((char*)pkt, pkt_len);
|
||||
if (!((*resp)[i].resp= strndup((char*) pkt, pkt_len)))
|
||||
return PAM_CONV_ERR;
|
||||
param->ptr = param->buf + 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue