Skip to content

Commit 6a4f09c

Browse files
authored
Berry fix vulnerability in solidify code
Found by Claude.ai
1 parent d7f9142 commit 6a4f09c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/libesp32/berry/src/be_solidifylib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static unsigned toidentifier_length(const char *s)
6969
unsigned len = 1;
7070
const char * p = s;
7171
while (*p) {
72-
if (p[0] == '_' && p[1] == 'X') {
72+
if (p[0] == '_' && p[1] != '\0' && p[1] == 'X') {
7373
len += 3;
7474
p += 2;
7575
} else if (isalnum(p[0]) || p[0] == '_') {

0 commit comments

Comments
 (0)