LWN.net Logo

NOT a Language misfeature, it's a Programming Error

NOT a Language misfeature, it's a Programming Error

Posted Jun 29, 2011 6:34 UTC (Wed) by eru (subscriber, #2753)
In reply to: NOT a Language misfeature, it's a Programming Error by lacos
Parent article: A hole in crypt_blowfish

I think you missed my point. I do agree it is a programming error. But this error (and countless like it) were made much easier to commit by this language misfeature, which makes straightforward code work in a very non-intuitive way.

unsigned char by the way is a fairly "new" invention. The original K&R C did not have it, just the char with implementation-dependent signedness. Therefore there probably still is legacy code around that has bugs like this because char was the only way to represent a byte, and the coders did not remember to put masking around all widening accesses.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds