From 3c1e193b379d7cf5c0c0944d26def114edbf54ba Mon Sep 17 00:00:00 2001 From: neoxic Date: Tue, 19 Dec 2023 22:17:51 -0800 Subject: [PATCH] Version 1.1 + Add "CRSF" to drop-down menus + Treat "led" as bit-field + Accept *.bin files only Minor fixes --- CMakeLists.txt | 2 +- main/main.c | 3 ++- main/root.html | 37 ++++++++++++++++++++++++++++++++----- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d13275b..9d03ed4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required(VERSION 3.16) -set(PROJECT_VER 1.0) +set(PROJECT_VER 1.1) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ESCape32-WiFi-Link) diff --git a/main/main.c b/main/main.c index ed799e1..e8c6b17 100644 --- a/main/main.c +++ b/main/main.c @@ -84,13 +84,14 @@ int processdns(uint8_t *buf, int len) { cur += 4; if (type != 1 || class != 1) continue; DNSAnswer *answer = (DNSAnswer *)pos; + pos += sizeof *answer; + if (pos - buf > 512) return 0; answer->name = htons(0xc000 | (name - buf)); answer->type = htons(type); answer->class = htons(class); answer->ttl = htonl(60); answer->len = htons(4); answer->addr = htonl(0xc0a80401); // 192.168.4.1 - pos += sizeof *answer; ++cnt; } memmove(cur, end, pos - end); // Ignore other sections diff --git a/main/root.html b/main/root.html index 0c16e19..fe96961 100644 --- a/main/root.html +++ b/main/root.html @@ -169,7 +169,7 @@
- +