diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-04-05 11:40:59 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-04-05 11:40:59 +0300 |
commit | 6ac4608cd802dba435d5aa7602ace312cacc8909 (patch) | |
tree | ca9623f5a0b9814b674c9dc34d2d2b00f0a04fed /src/microhttpd/digestauth.c | |
parent | e30143507e9dd805e2a0b0be25ea75974e74105a (diff) | |
download | libmicrohttpd-6ac4608cd802dba435d5aa7602ace312cacc8909.tar.gz libmicrohttpd-6ac4608cd802dba435d5aa7602ace312cacc8909.zip |
digestauth.c: fixed snprintf() error detection, used calloc instead of malloc (security).
Diffstat (limited to 'src/microhttpd/digestauth.c')
-rw-r--r-- | src/microhttpd/digestauth.c | 4 |
1 files 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, | |||
950 | int signal_stale) | 950 | int signal_stale) |
951 | { | 951 | { |
952 | int ret; | 952 | int ret; |
953 | size_t hlen; | 953 | int hlen; |
954 | char nonce[NONCE_STD_LEN + 1]; | 954 | char nonce[NONCE_STD_LEN + 1]; |
955 | 955 | ||
956 | /* Generating the server nonce */ | 956 | /* Generating the server nonce */ |
@@ -986,7 +986,7 @@ MHD_queue_auth_fail_response (struct MHD_Connection *connection, | |||
986 | { | 986 | { |
987 | char *header; | 987 | char *header; |
988 | 988 | ||
989 | header = malloc (hlen + 1); | 989 | header = MHD_calloc_ (1, hlen + 1); |
990 | if (NULL == header) | 990 | if (NULL == header) |
991 | { | 991 | { |
992 | #ifdef HAVE_MESSAGES | 992 | #ifdef HAVE_MESSAGES |