You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by GitBox <gi...@apache.org> on 2021/07/30 14:35:51 UTC

[GitHub] [celix] pnoltes commented on a change in pull request #351: Refactors http_admin to use gtest and fixes a segfault issue

pnoltes commented on a change in pull request #351:
URL: https://github.com/apache/celix/pull/351#discussion_r679975016



##########
File path: bundles/http_admin/http_admin/src/service_tree.c
##########
@@ -307,8 +307,8 @@ service_tree_node_t *findServiceNodeInTree(service_tree_t *svc_tree, const char
 
         char *uri_token = strtok_r(uri_cpy, "/", &save_ptr);
         //Check for horizontal matches for the first token
-        while(current != NULL) {
-            if(strcmp(current->svc_data->sub_uri, uri_token) == 0){
+        while (current != NULL) {
+            if (uri_token != NULL && strcmp(current->svc_data->sub_uri, uri_token) == 0){

Review comment:
       added a check for uri_token == NULL




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org