Use strcmp() instead of strncmp()
strncmp() isn't intended to be a secure strcmp() replacement, it is designed to be used if you want to compare the first n characters of two strings. Since we always compare character pointers with string literals, switch to using strcmp() everywhere. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -943,7 +943,7 @@ recur_repeat_item (void)
|
||||
status_mesg (_(outstr), "");
|
||||
if (getstring (win[STA].p, user_input, BUFSIZ, 0, 1) == GETSTRING_VALID)
|
||||
{
|
||||
if (strlen (user_input) == 1 && strncmp (user_input, "0", 1) == 0)
|
||||
if (strlen (user_input) == 1 && strcmp (user_input, "0") == 0)
|
||||
{
|
||||
until = 0;
|
||||
date_entered = 1;
|
||||
|
||||
Reference in New Issue
Block a user