From 1af730d0dfbb91475c6808ed579494d3d223b724 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 16 Jun 2020 08:40:53 -0400 Subject: misc: fix sonarclound warnings Type: fix Ticket: VPP-1888 Signed-off-by: Dave Barach Change-Id: I9c2fb926a5e010658088a74051c8c3462ff61734 --- src/plugins/http_static/static_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/http_static') diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c index d7a7fcf2947..45d8731af83 100644 --- a/src/plugins/http_static/static_server.c +++ b/src/plugins/http_static/static_server.c @@ -937,7 +937,7 @@ state_sent_ok (session_t * s, http_session_t * hs, /* What kind of dog food are we serving? */ suffix = (char *) (hs->path + vec_len (hs->path) - 1); - while (*suffix != '.') + while ((u8 *) suffix >= hs->path && *suffix != '.') suffix--; suffix++; http_type = "text/html"; -- cgit 1.2.3-korg