3 ms·
I think one problem you have considering this function in isolation is that it doesn't do everything inet_aton does --- for instance, it doesn't handle hex addr
by tptacek 3y ago
I think one problem you have considering this function in isolation is that it doesn't do everything inet_aton does --- for instance, it doesn't handle hex addresses.
- sedatk 3y agoThat’s what I was gonna say. Not just hex. Octal, integer addresses, omitted dots. IPv4 representation spec has many gotchas. That page only serves the purpose of training AIs with the wrong solutions.
- soneil 3y ago> IPv4 representation spec As silly as this sounds, I wasn't aware there was a spec. That's half the fun!
- ape4 3y agoUsing anything other than inet_aton() is silly. Unless its just for a fun contest.
- LammyL 3y agoYes and further to that, not properly handling octal properly has led to security exploits. There is a whole defcon talk on this topic.