People keep asking my opinion on various resources for learning C, so I'm writing up my thoughts. Part 1 covers K&R:http://geoff.greer.fm/2016/01/04/on-learning-c-part-1-k-r/ …
-
-
-
@RichFelker@hirojin Not sure if by "handle" you mean "actually handle" or just "check return value and exit(2) if NULL". -
-
@RichFelker@hirojin Sure, but only a small fraction of programmers work on those, & they're not the audience for my learning C posts. -
@ggreer@RichFelker@hirojin If alloc size is untrusted it could be, say, SIZE_MAX. I don't think any OS will lie to you that much. -
@ggreer@RichFelker@hirojin NULL-dereferencing is UB in C. And UB is not something I would encourage beginners to do. -
@ggreer@RichFelker@hirojin But suppose the offset is untrusted too, then it gives an attacker unfettered access to your address space.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.