It's been a while since I was in school also, but I recall being taught the same thing. I've been amazed at the number of buffer overflows being discovered over the past decade or so.
It is certainly possible to write code that expects input to be delineated by terminating characters. I've never released anything that would crash if the data were corrupt.
For testing, I used to open exe files with programs expecting ascii text.