Check for end of string when parsing Gopher URLs
This fixes issue #199 reported by Kuang-che Wu. A specially crafted Gopher URL (e.g. '<a href=gopher:R>') could lead to an out-of-bounds read. Problem here was, that 'p' was incremented twice without checking for the end of the string. The interesting question for me is: What does this 'if' actually check? What is special here about the 'R'? I did not find anything related in RFC 1436 or in RFC 4266.
This commit is contained in:
Reference in New Issue
Block a user