summaryrefslogtreecommitdiffstats
path: root/src/plugins/http_static
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-06-16 08:40:53 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-18 19:47:21 +0000
commit3180fe56516829e1a7458d25ae2545ad07d0daca (patch)
treebc2efaab4bf14bc8072b7e8173ba5f7a4c5d2b8a /src/plugins/http_static
parent6ed81620909387c7a55dbe03b152a75fdc219a64 (diff)
misc: fix sonarclound warnings
Type: fix Ticket: VPP-1888 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I9c2fb926a5e010658088a74051c8c3462ff61734 (cherry picked from commit 1af730d0dfbb91475c6808ed579494d3d223b724)
Diffstat (limited to 'src/plugins/http_static')
-rw-r--r--src/plugins/http_static/static_server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c
index ef9d3d77e41..73ea8895de3 100644
--- a/src/plugins/http_static/static_server.c
+++ b/src/plugins/http_static/static_server.c
@@ -933,7 +933,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";