[vlc-devel] commit: Fix NULL pointer deferences (CID 120 & 121) ( Rémi Denis-Courmont )

git version control git at videolan.org
Fri May 30 17:56:41 CEST 2008


vlc | branch: 0.8.6-bugfix | Rémi Denis-Courmont <rem at videolan.org> | Fri May 30 18:56:42 2008 +0300| [fca556b4e7131845e4539075d3fb0df55b2b2988]

Fix NULL pointer deferences (CID 120 & 121)
(cherry picked from commit fb04f24982242a835b3ae7382f6dd4fcf6ace5f9)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fca556b4e7131845e4539075d3fb0df55b2b2988
---

 src/network/httpd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index 3431a2e..ecd1a01 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -365,7 +365,6 @@ struct httpd_file_t
 static int httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl, httpd_message_t *answer, httpd_message_t *query )
 {
     httpd_file_t *file = (httpd_file_t*)p_sys;
-    uint8_t *psz_args = query->psz_args;
     uint8_t **pp_body, *p_body;
     char *psz_connection = NULL;
     int *pi_body, i_body;
@@ -403,6 +402,7 @@ static int httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl,
         /* msg_Warn not supported */
     }
 
+    uint8_t *psz_args = query->psz_args;
     file->pf_fill( file->p_sys, file, psz_args, pp_body, pi_body );
 
     if( query->i_type == HTTPD_MSG_HEAD && p_body != NULL )
@@ -486,7 +486,6 @@ struct httpd_handler_t
 static int httpd_HandlerCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl, httpd_message_t *answer, httpd_message_t *query )
 {
     httpd_handler_t *handler = (httpd_handler_t*)p_sys;
-    uint8_t *psz_args = query->psz_args;
     char psz_remote_addr[NI_MAXNUMERICHOST];
 
     if( answer == NULL || query == NULL )
@@ -503,6 +502,7 @@ static int httpd_HandlerCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *c
     if( httpd_ClientIP( cl, psz_remote_addr ) == NULL )
         *psz_remote_addr = '\0';
 
+    uint8_t *psz_args = query->psz_args;
     handler->pf_fill( handler->p_sys, handler, query->psz_url, psz_args,
                       query->i_type, query->p_body, query->i_body,
                       psz_remote_addr, NULL,




More information about the vlc-devel mailing list