Skip to content

Commit c6e661e

Browse files
1 parent 17d4aeb commit c6e661e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

third_party/musl/METADATA

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ third_party {
1414
day: 1
1515
}
1616
license_type: NOTICE
17+
security {
18+
mitigated_security_patch: "CVE-2025-26519" # Cherry-picked patches
19+
}
1720
}

third_party/musl/src/locale/iconv.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
495495
if (c >= 93 || d >= 94) {
496496
c += (0xa1-0x81);
497497
d += 0xa1;
498-
if (c >= 93 || c>=0xc6-0x81 && d>0x52)
498+
if (c > 0xc6-0x81 || c==0xc6-0x81 && d>0x52)
499499
goto ilseq;
500500
if (d-'A'<26) d = d-'A';
501501
else if (d-'a'<26) d = d-'a'+26;
@@ -538,6 +538,10 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
538538
if (*outb < k) goto toobig;
539539
memcpy(*out, tmp, k);
540540
} else k = wctomb_utf8(*out, c);
541+
/* This failure condition should be unreachable, but
542+
* is included to prevent decoder bugs from translating
543+
* into advancement outside the output buffer range. */
544+
if (k>4) goto ilseq;
541545
*out += k;
542546
*outb -= k;
543547
break;

0 commit comments

Comments
 (0)