Skip to content

Commit 7d04c80

Browse files
committed
CID 909251: CHECKED_RETURN
1 parent fdf5d95 commit 7d04c80

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugins/protocol_lws_captcha_ratelimit/protocol_lws_captcha_ratelimit.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ ratelimit_get_config_js(struct lws *wsi, char *buf, size_t max_len)
6767
const struct lws_http_mount *m;
6868
int n = 0;
6969

70-
uri[0] = '\0';
71-
lws_hdr_copy(wsi, uri, sizeof(uri), WSI_TOKEN_GET_URI);
70+
if (lws_hdr_copy(wsi, uri, sizeof(uri), WSI_TOKEN_GET_URI) < 0)
71+
return 0;
72+
7273
m = lws_find_mount(wsi, uri, (int)strlen(uri));
7374
if (m && m->interceptor_path) {
7475
n = lws_snprintf(buf, max_len, "var lws_interceptor_path = \"%s\";\n",

0 commit comments

Comments
 (0)