Isn't K&R's book littered with code examples that were canonical in the 80's but have glaring security holes? I wonder whether it's a good idea to have students work through "the bible". Hopefully they provide extensive exegesis in the lectures.
That's probably a pretty good analogy - it's useful maybe for historical value, but it has to be understood that some of what's listed is no longer best practice and you can't, for instance, go around stoning adulterers and amputating thieves' hands.
To clarify, GP here is probably talking about UB security holes, not stuff like XSS. Most intro texts I've seen have "watch out!" notes all over the place.