diff options
author | Christian Hesse <mail@eworm.de> | 2013-07-05 08:36:40 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-07-05 08:36:40 +0200 |
commit | 86d04e087b81dc4d19aa72ec4172532cd5d146c4 (patch) | |
tree | 5cb2c1c7e9949a094496240b0b70a95515a920bd /nthash.c | |
parent | c65257f961a75d8738ffb114163a1992061fb6a6 (diff) | |
download | nthash-0.1.1.tar.gz nthash-0.1.1.tar.zst |
be more verbose about problematic characters in input0.1.1
Diffstat (limited to 'nthash.c')
-rw-r--r-- | nthash.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -22,6 +22,10 @@ int main(int argc, char **argv) { for (i = 0; i < done; i++) { if (buffer[i] == 0xa) fprintf(stderr, "Warning: Password contains line break!\n"); + else if (buffer[i] < 0x20 || buffer[i] == 0x7f) + fprintf(stderr, "Warning: Password contains non-printable control character 0x%x!\n", buffer[i]); + else if (buffer[i] > 0x7f) + fprintf(stderr, "Warning: Password contains non-ASCII character 0x%x!\n", buffer[i]); buffernull[i*2] = buffer[i]; buffernull[i*2+1] = 0; } |