← All stories
● Covered by 1 source · 1 reportMedium impact1 negative

Android 17 wcscspn()/wcspbrk() functions fail on wide characters >= U+0100

🔄 Updated 24d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Android 17's `wcscspn()` and `wcspbrk()` misidentify wide characters >= U+0100.
  • The bug occurs when the reject set contains two or more characters all < U+0100.
  • Disassembly of `libc.so` was used to identify the mechanism of the bug.
  • The regression appeared between June and September 2026 Android 17 builds.

Critical Bug in Wide String Functions

A significant bug has been identified in the `wcscspn()` and `wcspbrk()` functions within Android 17 builds from September 2026. These functions incorrectly report a match when encountering any wide character (wchar_t) with a value greater than or equal to U+0100, even if that character is not present in the specified reject set. This behavior manifests when the reject set consists of two or more characters, all of which are less than U+0100.

Impact on Applications

The flaw directly impacts applications that scan wide strings for ASCII delimiters, such as newline or wildcard characters. Any such code will fail as soon as the string content includes non-ASCII characters like emojis, CJK characters, Cyrillic, Greek, or Latin Extended characters. This can lead to incorrect string processing and potential application errors.

Discovery Through Disassembly

The bug was discovered by developers who resorted to disassembling the `libc.so` library from shipped Android 17 builds. This method was necessary due to delays in the release of the corresponding Android Open Source Project (AOSP) source code. The disassembly revealed that the faulty logic resides in a specific code path within `wcscspn()` that handles reject sets with two or more characters, all below U+0100.

Regression Analysis

Analysis indicates that the public `android17-release` sources (version `android-17.0.0_r1`, June 2026) build `wcscspn()` and `wcspbrk()` from `external/llvm-libc`, which implements a correct plain nested loop. The problematic code path was introduced between the June and September 2026 releases of Android 17, indicating a regression in the `bionic` library.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 07

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

Developers are reporting a bug in Android 17's `wcscspn()` and `wcspbrk()` functions where they incorrectly treat any wide character (wchar_t) greater than or equal to U+0100 as a match, even if it's not in the search set. This issue, discovered through disassembly of shipped libraries due to delayed AOSP source releases, affects code scanning wide strings for ASCII delimiters when text contains non-ASCII characters like emojis or CJK characters.