eliben / code-for-blog

Code samples from my blog
The Unlicense
1.57k stars 744 forks source link

buffer overrun? #65

Closed oaf-edwin closed 1 year ago

oaf-edwin commented 1 year ago

Umm... in 2019/xml-stream/c-libxmlsax-count/c-libxmlsax-count.c, line 42, don't you mean len + 1 instead of len - 1?

(Also, you might as well check inLocation before going to the trouble of copying the string.)

eliben commented 1 year ago

Thanks, fixed.