What's so bad about scanf anyway???
Roy M. Silvernail
roy%cybrspc at cs.umn.edu
Tue Nov 13 14:16:40 AEST 1990
imp at marvin.Solbourne.COM (Warner Losh) writes:
> gets() is a bad function to use when you don't have total control over
> the input (like a user typing at a program). Since it can't check to
> see if the input line is too large for the buffer, "bad things" can
> happen as a result.
Thank you! I hadn't thought of this possibility. Anything I can do to
make my stuff more fool-resistant... (in anticipation of the
new-model-year improved fools ;-)
--
Roy M. Silvernail |+| roy%cybrspc at cs.umn.edu |+| #define opinions ALL_MINE;
main(){float x=1;x=x/50;printf("It's only $%.2f, but it's my $%.2f!\n",x,x);}
"This is cyberspace." -- Peter da Silva :--: "...and I like it here!" -- me
More information about the Comp.lang.c
mailing list