X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnetwork%2Fhttpd.c;h=8b7c883836f87e9d7ed381dc21856d822bf5ee11;hb=18115b669990c67216cc740deab06e88bd8bfd3e;hp=1a5d7433346af05525ddc45ef5a325041652fd56;hpb=baacaea316cff470f3fe11e52a833ef4a51afe74;p=vlc diff --git a/src/network/httpd.c b/src/network/httpd.c index 1a5d743334..8b7c883836 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -622,6 +622,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys, httpd_message_t *query ) { httpd_redirect_t *rdir = (httpd_redirect_t*)p_sys; + char *p_body; if( answer == NULL || query == NULL ) { @@ -633,7 +634,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys, answer->i_status = 301; answer->psz_status = strdup( "Moved Permanently" ); - answer->i_body = asprintf( (char **)&answer->p_body, + answer->i_body = asprintf( &p_body, "\n" "\n" @@ -649,6 +650,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys, "
\n" "\n" "\n", rdir->psz_dst ); + answer->p_body = (unsigned char *)p_body; /* XXX check if it's ok or we need to set an absolute url */ httpd_MsgAdd( answer, "Location", "%s", rdir->psz_dst );