mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03: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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user