[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 02/03: digestauth.c: fixed snprintf() error
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 02/03: digestauth.c: fixed snprintf() error detection, used calloc instead of malloc (security). |
Date: |
Wed, 05 Apr 2017 12:00:20 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 6ac4608cd802dba435d5aa7602ace312cacc8909
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Wed Apr 5 11:40:59 2017 +0300
digestauth.c: fixed snprintf() error detection, used calloc instead of
malloc (security).
---
src/microhttpd/digestauth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 638c0825..aad8ac15 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -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
--
To stop receiving notification emails like this one, please contact
address@hidden