mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-06 15:51:25 +00:00
Squashed commit of the following:
commit7ba68dd20dAuthor: Jean-Francois Simon <jfsimon@startmail.com> Date: Wed Nov 16 16:19:50 2022 +0100 Proper C/C++ struct initialization. commitaeab3ef7acAuthor: Jean-Francois Simon <jfsimon@startmail.com> Date: Tue Nov 15 17:09:29 2022 +0100 Fixed C++ builds. commit2afd529107Merge:14710b81f8445a4cAuthor: jfsimon1981 <jfsimon1981@gmail.com> Date: Tue Nov 15 11:33:56 2022 +0100 Merge branch 'cesanta:master' into master commit14710b81e4Author: Jean-Francois Simon <jfsimon@startmail.com> Date: Tue Nov 15 11:07:15 2022 +0100 Added MIP free. commit6393cd149dAuthor: Jean-Francois Simon <jfsimon@startmail.com> Date: Tue Nov 15 11:06:44 2022 +0100 Adding mip_free() function. commitfeee81b733Author: Jean-Francois Simon <jfsimon@startmail.com> Date: Tue Nov 15 11:05:55 2022 +0100 Adding mip_free() function. commitf8445a4c85Merge:a39b7ddb71f5be01Author: Sergio R. Caprile <scaprile@users.noreply.github.com> Date: Fri Nov 11 20:42:38 2022 -0300 Merge pull request #1853 from cesanta/tibaremetaltest Update test.yml commit71f5be011bAuthor: Sergio R. Caprile <scaprile@users.noreply.github.com> Date: Fri Nov 11 20:15:01 2022 -0300 Update test.yml commitb53d3cf032Merge:7a71038aa39b7ddbAuthor: jfsimon1981 <jfsimon1981@gmail.com> Date: Fri Nov 11 16:10:53 2022 +0100 Merge branch 'cesanta:master' into master commit7a71038a27Author: jfsimon1981 <jfsimon1981@gmail.com> Date: Fri Nov 11 16:09:22 2022 +0100 Update mip_test.c commita39b7ddbacAuthor: cpq <valenok@gmail.com> Date: Fri Nov 11 15:03:48 2022 +0000 Fix fuzzer use-after-poison READ 1
This commit is contained in:
1 parent
cab5c822c5
commit
7b0509c878
7 files changed
+216
-5
No files matched your search
+7
-2
@@ -3196,7 +3196,7 @@ int mg_mqtt_parse(const uint8_t *buf, size_t len, uint8_t version,
|
||||
p += 2;
|
||||
}
|
||||
if (p > end) return MQTT_MALFORMED;
|
||||
if (version == 5 && p + 1 < end) p += 1 + p[0]; // Skip options
|
||||
if (version == 5 && p + 2 < end) p += 1 + p[0]; // Skip options
|
||||
if (p > end) return MQTT_MALFORMED;
|
||||
m->data.ptr = (char *) p;
|
||||
m->data.len = (size_t) (end - p);
|
||||
@@ -7007,7 +7007,7 @@ static size_t tx_tcp(struct mip_if *ifp, uint32_t dst_ip, uint8_t flags,
|
||||
struct ip *ip = tx_ip(ifp, 6, ifp->ip, dst_ip, sizeof(struct tcp) + len);
|
||||
struct tcp *tcp = (struct tcp *) (ip + 1);
|
||||
memset(tcp, 0, sizeof(*tcp));
|
||||
memmove(tcp + 1, buf, len);
|
||||
if (buf != NULL && len) memmove(tcp + 1, buf, len);
|
||||
tcp->sport = sport;
|
||||
tcp->dport = dport;
|
||||
tcp->seq = seq;
|
||||
@@ -7374,6 +7374,11 @@ void mip_init(struct mg_mgr *mgr, struct mip_if *ifp) {
|
||||
}
|
||||
}
|
||||
|
||||
void mip_free(struct mip_if * ifp) {
|
||||
free((char *)ifp->rx.ptr);
|
||||
free((char *)ifp->tx.ptr);
|
||||
}
|
||||
|
||||
int mg_mkpipe(struct mg_mgr *m, mg_event_handler_t fn, void *d, bool udp) {
|
||||
(void) m, (void) fn, (void) d, (void) udp;
|
||||
MG_ERROR(("Not implemented"));
|
||||
|
||||
Reference in new issue
Block a user