Closed codecat closed 8 years ago
So I stumbled upon this: https://github.com/sheredom/utf8.h/blob/master/utf8.h#L697
Is this a crash waiting to happen, or am I reading the logic wrong?
If both h and n are equal strings, this will read past the memory of those strings.
h
n
Hmm you are probably right! I'll add a test for that and we'll make sure it fails, then probably have to add on a check for null terminator there too.
Good find thanks! :smile:
So I stumbled upon this: https://github.com/sheredom/utf8.h/blob/master/utf8.h#L697
Is this a crash waiting to happen, or am I reading the logic wrong?
If both
h
andn
are equal strings, this will read past the memory of those strings.