X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_auth_api.c;h=be2f74434322dab6d5d8831378dbdc1a843f948a;hp=386faffcf3eb9fe537569ff4a8e829dbd7111b60;hb=a84e2e5f8fa39386883754b6ab8bcd7fbfb5ed94;hpb=0ac32c9b8590e88a5f110cc8b3154001d5c0c089 diff --git a/http_auth_api.c b/http_auth_api.c index 386faff..be2f744 100644 --- a/http_auth_api.c +++ b/http_auth_api.c @@ -60,10 +60,8 @@ PHP_HTTP_API STATUS _http_auth_credentials(char **user, char **pass TSRMLS_DC) zval *zauth = NULL; HTTP_GSC(zauth, "HTTP_AUTHORIZATION", FAILURE); { - char *decoded, *colon; int decoded_len; - decoded = php_base64_decode(Z_STRVAL_P(zauth), Z_STRLEN_P(zauth), - &decoded_len); + char *colon, *decoded = php_base64_decode(Z_STRVAL_P(zauth), Z_STRLEN_P(zauth), &decoded_len); if (colon = strchr(decoded + 6, ':')) { *user = estrndup(decoded + 6, colon - decoded - 6);