diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-01-05 14:25:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-01-05 14:25:18 +0000 |
commit | b454d32814534c950fe9d9ab082be1702f9d8f75 (patch) | |
tree | 94f92210e02fb4e85b2d755ccfb73f4424753191 | |
parent | ccaa16a2649cde9abbcb7355fc292a1e2d5df277 (diff) | |
download | libmicrohttpd-b454d32814534c950fe9d9ab082be1702f9d8f75.tar.gz libmicrohttpd-b454d32814534c950fe9d9ab082be1702f9d8f75.zip |
fix 1636
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/daemon/digestauth.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,7 @@ | |||
1 | Wed Jan 5 15:20:11 CET 2011 | 1 | Wed 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 | ||
5 | Tue Jan 4 13:07:21 CET 2011 | 6 | Tue 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); |