summaryrefslogtreecommitdiff
path: root/src/hash-questions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash-questions.c')
-rw-r--r--src/hash-questions.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hash-questions.c b/src/hash-questions.c
index f41023b..adcf62c 100644
--- a/src/hash-questions.c
+++ b/src/hash-questions.c
@@ -23,7 +23,7 @@
The hash used is SHA-256. If we're building with DNSSEC support,
we use the Nettle cypto library. If not, we prefer not to
- add a dependency on Nettle, and use a stand-alone implementaion.
+ add a dependency on Nettle, and use a stand-alone implementation.
*/
#include "dnsmasq.h"
@@ -55,7 +55,7 @@ unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name
char *cp, c;
if (!extract_name(header, plen, &p, name, 1, 4))
- break; /* bad packet */
+ return NULL; /* bad packet */
for (cp = name; (c = *cp); cp++)
if (c >= 'A' && c <= 'Z')
@@ -67,7 +67,7 @@ unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name
p += 4;
if (!CHECK_LEN(header, p, plen, 0))
- break; /* bad packet */
+ return NULL; /* bad packet */
}
hash->digest(ctx, hash->digest_size, digest);
@@ -109,7 +109,7 @@ unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name
char *cp, c;
if (!extract_name(header, plen, &p, name, 1, 4))
- break; /* bad packet */
+ return NULL; /* bad packet */
for (cp = name; (c = *cp); cp++)
if (c >= 'A' && c <= 'Z')
@@ -121,7 +121,7 @@ unsigned char *hash_questions(struct dns_header *header, size_t plen, char *name
p += 4;
if (!CHECK_LEN(header, p, plen, 0))
- break; /* bad packet */
+ return NULL; /* bad packet */
}
sha256_final(&ctx, digest);