|
Re: Printf Oddity : Programming Challange
Quote:
|
Originally Posted by DarkAlex
If the initialization statement, which might be stored as a static array of characters, was, for some reason, larger than the allowed buffer on the printf statement (about 42?) would that possibly cause the error? I don't think it was, but just in case. We'll probably be pit neighbors at Drexel. I'll bring a candy bar.
|
Printf can be a source of this kind of problem. I know with the old IFI implementation the string array was copied into a data buffer of fixed size with no limit check. If the format string was > 80 characters an overwrite occurred. This is usually easy to spot because the clobbered variables have typical ASCII values like 8224 (2 blank spaces).
Bring Skittles 
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
|