C
CBFalconer
Markus said:I think that I finally found a solution. It looks a little bit
unconventional, but it finally seems to work. I built an endless
loop around it, to see if the entry is buffered and is written
into the variable after the loop passes the second time.
A short time ago I answered you, saying:
"See my post of 2006-01-31, subject line "checking and verifying
input line in a C program", in this newsgroup (c.l.c). Basically
use the provided streams, without buffers, and base things on
acquiring unsigned values. That code also illustrates prechecking
that a calculation will not overflow, based on limits.h."
Did you ever bother to read that, which included tested code to
handle exactly your problem? Everything you have published seems
to have gaping security and accuracy holes.
--
"The power of the Executive to cast a man into prison without
formulating any charge known to the law, and particularly to
deny him the judgement of his peers, is in the highest degree
odious and is the foundation of all totalitarian government
whether Nazi or Communist." -- W. Churchill, Nov 21, 1943