coverity 181574: confirm uri_ptr non-null before deref
authorAndy Green <andy@warmcat.com>
Wed, 19 Jul 2017 06:19:03 +0000 (14:19 +0800)
committerAndy Green <andy@warmcat.com>
Wed, 19 Jul 2017 06:19:03 +0000 (14:19 +0800)
lib/server.c

index 668f6f1..69b0e8a 100644 (file)
@@ -777,7 +777,7 @@ lws_http_action(struct lws *wsi)
 
        /* we insist on absolute paths */
 
-       if (uri_ptr[0] != '/') {
+       if (!uri_ptr || uri_ptr[0] != '/') {
                lws_return_http_status(wsi, HTTP_STATUS_FORBIDDEN, NULL);
 
                goto bail_nuke_ah;