Skip to content

Commit 8db6f7b

Browse files
fix: V-001 security vulnerability
Automated security fix generated by Orbis Security AI
1 parent dc807bc commit 8db6f7b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

main/rfc1867.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ static void normalize_protected_variable(char *varname) /* {{{ */
6969

7070
/* and remove it */
7171
if (s != varname) {
72-
memmove(varname, s, strlen(s)+1);
72+
size_t slen = strlen(s) + 1;
73+
memmove(varname, s, slen);
7374
}
7475

7576
for (p = varname; *p && *p != '['; p++) {
@@ -596,6 +597,9 @@ static size_t multipart_buffer_read(multipart_buffer *self, char *buf, size_t by
596597
}
597598

598599
/* maximum number of bytes we are reading */
600+
if (bytes == 0) {
601+
return 0;
602+
}
599603
len = max < bytes-1 ? max : bytes-1;
600604

601605
/* if we read any data... */

0 commit comments

Comments
 (0)