aboutsummaryrefslogtreecommitdiff
path: root/src/topology
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-13 10:34:46 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-13 10:34:46 +0000
commit2749384c8aaa69fbc36ce543a91a2bd725cf0fa7 (patch)
tree6fd6594872e335e5231a4f2ac6784566e5d84200 /src/topology
parentf3ea350b538c3c8584bb5f37b038eb6e5fc3ff16 (diff)
downloadgnunet-2749384c8aaa69fbc36ce543a91a2bd725cf0fa7.tar.gz
gnunet-2749384c8aaa69fbc36ce543a91a2bd725cf0fa7.zip
pass only unsigned char to isspace and the like
Diffstat (limited to 'src/topology')
-rw-r--r--src/topology/gnunet-daemon-topology.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index 8c31fea58..33eda8a0d 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -1100,19 +1100,19 @@ read_friends_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
1100 } 1100 }
1101 entries_found = 0; 1101 entries_found = 0;
1102 pos = 0; 1102 pos = 0;
1103 while ((pos < frstat.st_size) && isspace (data[pos])) 1103 while ((pos < frstat.st_size) && isspace ( (unsigned char) data[pos]))
1104 pos++; 1104 pos++;
1105 while ((frstat.st_size >= sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)) && 1105 while ((frstat.st_size >= sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)) &&
1106 (pos <= frstat.st_size - sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded))) 1106 (pos <= frstat.st_size - sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)))
1107 { 1107 {
1108 memcpy (&enc, &data[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)); 1108 memcpy (&enc, &data[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded));
1109 if (!isspace (enc.encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1])) 1109 if (!isspace ( (unsigned char) enc.encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
1110 { 1110 {
1111 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1111 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1112 _("Syntax error in topology specification at offset %llu, skipping bytes.\n"), 1112 _("Syntax error in topology specification at offset %llu, skipping bytes.\n"),
1113 (unsigned long long) pos); 1113 (unsigned long long) pos);
1114 pos++; 1114 pos++;
1115 while ((pos < frstat.st_size) && (!isspace (data[pos]))) 1115 while ((pos < frstat.st_size) && (!isspace ( (unsigned char) data[pos])))
1116 pos++; 1116 pos++;
1117 continue; 1117 continue;
1118 } 1118 }
@@ -1146,7 +1146,7 @@ read_friends_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
1146 } 1146 }
1147 } 1147 }
1148 pos = pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded); 1148 pos = pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded);
1149 while ((pos < frstat.st_size) && isspace (data[pos])) 1149 while ((pos < frstat.st_size) && isspace ( (unsigned char) data[pos]))
1150 pos++; 1150 pos++;
1151 } 1151 }
1152 GNUNET_free (data); 1152 GNUNET_free (data);