Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt handle ctype...



details:   https://anonhg.NetBSD.org/src/rev/7bff3516a1fe
branches:  trunk
changeset: 773111:7bff3516a1fe
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 28 03:04:27 2012 +0000

description:
handle ctype lossage

diffstat:

 crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r db075eb48541 -r 7bff3516a1fe crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c
--- a/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c    Sat Jan 28 02:56:55 2012 +0000
+++ b/crypto/external/cpl/tpm-tools/dist/src/tpm_mgmt/tpm_nvcommon.c    Sat Jan 28 03:04:27 2012 +0000
@@ -116,7 +116,7 @@
        while (offset < totlen) {
                int found = 0;
 
-               while (isspace(*(aArg + offset)))
+               while (isspace((unsigned char)*(aArg + offset)))
                        offset++;
 
                for (i = 0; svals[i].name; i++) {
@@ -155,7 +155,7 @@
                }
 
                while (!found) {
-                       if (!isdigit(*(aArg+offset)))
+                       if (!isdigit((unsigned char)*(aArg+offset)))
                                break;
 
                        if (sscanf(aArg + offset, "%u%n", &num, &numbytes) != 1) {
@@ -247,7 +247,7 @@
                       unsigned int minimum, unsigned int maximum,
                      const char *name)
 {
-       while (isspace(*aArg))
+       while (isspace((unsigned char)*aArg))
                aArg++;
 
        if (strncmp(aArg, "0x", 2) == 0) {
@@ -255,7 +255,7 @@
                        return -1;
                }
        } else {
-               if (!isdigit(*aArg)) {
+               if (!isdigit((unsigned char)*aArg)) {
                        fprintf(stderr,
                                "%s must be a positive integer.\n", name);
                        return -1;



Home | Main Index | Thread Index | Old Index