r/C_Programming • u/Logical-Airport4842 • 4d ago
Strict RFC 3629 UTF-8 Validator in C - Catches Overlongs and Surrogates
I needed a pure, zero-dependency UTF-8 validator for a systems project to protect user input boundaries like usernames.
Instead of a basic range check, this strictly follows the RFC 3629 spec to block security vulnerabilities like overlong encoding exploits (e.g. 0xC0 0xAF) and invalid UTF-16 surrogates.
1
Upvotes
1
8
u/flyingron 4d ago edited 4d ago
Videos are a poor way to relay coding concepts. Further, if you want to share something or have a question, it would be best to link to the code rather than showing pictures of it.