Files
wlan-ap/feeds/ucentral/opennds/patches/200-exploits.patch
John Crispin b0af666cb4 opennds: fix a segfault caused that can be triggered via a bad url parameter
Fixes: WIFI-6724
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-12 17:52:30 +01:00

14 lines
558 B
Diff

Index: openNDS-9.0.0/src/http_microhttpd.c
===================================================================
--- openNDS-9.0.0.orig/src/http_microhttpd.c
+++ openNDS-9.0.0/src/http_microhttpd.c
@@ -531,7 +531,7 @@ static int try_to_authenticate(struct MH
debug(LOG_DEBUG, "client->token=%s tok=%s ", client->token, tok );
//Check if token (tok) or hash_id (hid) mode
- if (strlen(tok) > 8) {
+ if (tok && strlen(tok) > 8) {
// hid mode
hash_str(hid, sizeof(hid), client->token);
safe_asprintf(&rhidraw, "%s%s", hid, config->fas_key);