cute_headers icon indicating copy to clipboard operation
cute_headers copied to clipboard

cute_utf.h - Code paths to deal with malicious strings

Open RandyGaul opened this issue 5 years ago • 1 comments

As of now there's no logic to deal with invalidly encoded strings. Some code paths for this would be needed for a secure implementation.

I was thinking of maybe using two different functions -- one to validate the correctness of a string, and another that assumes correctness (which would be all the current functions as-is). This would be slightly inefficient to do string validation, but validation only has to happen once in the usual case, so I think the priority for most use-cases would instead be a really simple API over the most optimized run-time.

RandyGaul avatar Mar 03 '20 21:03 RandyGaul

Reference: https://opensource.apple.com/source/tidy/tidy-2.2/tidy/src/utf8.c.auto.html

RandyGaul avatar Sep 12 '22 21:09 RandyGaul

https://github.com/RandyGaul/cute_headers/issues/331

RandyGaul avatar Nov 10 '22 08:11 RandyGaul