Re: Comparing string input to enum data type
- From: Ben Pfaff <blp@xxxxxxxxxxxxxxx>
- Date: Wed, 28 Feb 2007 10:45:29 -0800
"Bill Pursell" <bill.pursell@xxxxxxxxx> writes:
Just a general tendency to refrain from using
strcmp. In this case, since one of the strings is
fixed, there's no security issue with strcmp (until
the code maintainer modifies the code...),
but I believe it's a good habit to use the strncmp
variant.
What kind of a security issue would there be with strcmp?
--
"Some programming practices beg for errors;
this one is like calling an 800 number
and having errors delivered to your door."
--Steve McConnell
.
- References:
- Comparing string input to enum data type
- From: dtschoepe@xxxxxxxxx
- Re: Comparing string input to enum data type
- From: Bill Pursell
- Re: Comparing string input to enum data type
- From: Keith Thompson
- Re: Comparing string input to enum data type
- From: Bill Pursell
- Comparing string input to enum data type
- Prev by Date: Re: Redirecting stderr
- Next by Date: Re: pointer initialization
- Previous by thread: Re: Comparing string input to enum data type
- Next by thread: Re: Comparing string input to enum data type
- Index(es):
Relevant Pages
|