mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
digestauth.c: fixed snprintf() error detection, used calloc instead of malloc (security).
This commit is contained in:
@@ -950,7 +950,7 @@ MHD_queue_auth_fail_response (struct MHD_Connection *connection,
|
||||
int signal_stale)
|
||||
{
|
||||
int ret;
|
||||
size_t hlen;
|
||||
int hlen;
|
||||
char nonce[NONCE_STD_LEN + 1];
|
||||
|
||||
/* Generating the server nonce */
|
||||
@@ -986,7 +986,7 @@ MHD_queue_auth_fail_response (struct MHD_Connection *connection,
|
||||
{
|
||||
char *header;
|
||||
|
||||
header = malloc (hlen + 1);
|
||||
header = MHD_calloc_ (1, hlen + 1);
|
||||
if (NULL == header)
|
||||
{
|
||||
#ifdef HAVE_MESSAGES
|
||||
|
||||
Reference in New Issue
Block a user