aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scd/app-p15.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/scd/app-p15.c b/scd/app-p15.c
index 377879142..fc136b9fb 100644
--- a/scd/app-p15.c
+++ b/scd/app-p15.c
@@ -481,7 +481,7 @@ struct app_local_s
unsigned short auth_objects;
} odf;
- /* The PKCS#15 serialnumber from EF(TokeiNFo) or NULL. Malloced. */
+ /* The PKCS#15 serialnumber from EF(TokenInfo) or NULL. Malloced. */
unsigned char *serialno;
size_t serialnolen;
@@ -5003,7 +5003,11 @@ any_control_or_space (const char *string)
{
const unsigned char *s;
- for (s = string; *string; string++)
+ for (s = string; *s; s++)
+ if (*s <= 0x20 || *s >= 0x7f)
+ return 1;
+ return 0;
+}
if (*s <= 0x20 || *s >= 0x7f)
return 1;
return 0;