HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by udp | Hacker News Reader
Parent
Full thread
udp
·
Thanks, I changed it to block ".." in any form.
View on HN
tptacek
·
Doesn't this also read right off the end of the string?
udp
·
No, because if i[1] is 0 (the null terminator), i[1] == '.' will fail.
tptacek
·
Duh. Sorry.
zwp
·
No, it will hit the NULL terminator and short circuit.
Reply on news.ycombinator.com