aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-01-05 14:25:18 +0000
committerChristian Grothoff <christian@grothoff.org>2011-01-05 14:25:18 +0000
commitb454d32814534c950fe9d9ab082be1702f9d8f75 (patch)
tree94f92210e02fb4e85b2d755ccfb73f4424753191
parentccaa16a2649cde9abbcb7355fc292a1e2d5df277 (diff)
downloadlibmicrohttpd-b454d32814534c950fe9d9ab082be1702f9d8f75.tar.gz
libmicrohttpd-b454d32814534c950fe9d9ab082be1702f9d8f75.zip
fix 1636
-rw-r--r--ChangeLog1
-rw-r--r--src/daemon/digestauth.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 49cd7b39..78055fd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1Wed Jan 5 15:20:11 CET 2011 1Wed Jan 5 15:20:11 CET 2011
2 Fixing double-locking on non-Linux platforms when using 2 Fixing double-locking on non-Linux platforms when using
3 MHD_create_response_from_fd (#1639). -CG 3 MHD_create_response_from_fd (#1639). -CG
4 Avoid use of strndup for better portability (#1636). -CG
4 5
5Tue Jan 4 13:07:21 CET 2011 6Tue Jan 4 13:07:21 CET 2011
6 Added MHD_create_response_from_buffer, deprecating 7 Added MHD_create_response_from_buffer, deprecating
diff --git a/src/daemon/digestauth.c b/src/daemon/digestauth.c
index b6b1ccd8..dd87b251 100644
--- a/src/daemon/digestauth.c
+++ b/src/daemon/digestauth.c
@@ -689,7 +689,8 @@ MHD_basic_auth_get_username_password(struct MHD_Connection *connection,
689 free(decode); 689 free(decode);
690 return NULL; 690 return NULL;
691 } 691 }
692 user = strndup(decode, separator - decode); 692 user = strdup(decode);
693 user[separator - decode] = '\0'; /* cut off at ':' */
693 if (password != NULL) 694 if (password != NULL)
694 { 695 {
695 *password = strdup(separator + 1); 696 *password = strdup(separator + 1);