summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libaddns/dns.h10
-rw-r--r--source3/nmbd/nmbd_incomingrequests.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/source3/libaddns/dns.h b/source3/libaddns/dns.h
index a83c0b4f8e..188d139808 100644
--- a/source3/libaddns/dns.h
+++ b/source3/libaddns/dns.h
@@ -25,7 +25,15 @@
#ifndef _DNS_H
#define _DNS_H
-#include "config.h"
+#include "lib/replace/replace.h"
+
+/* make sure we have included the correct config.h */
+#ifndef NO_CONFIG_H /* for some tests */
+#ifndef CONFIG_H_IS_FROM_SAMBA
+#error "make sure you have removed all config.h files from standalone builds!"
+#error "the included config.h isn't from samba!"
+#endif
+#endif /* NO_CONFIG_H */
#include <stdio.h>
#include <stdlib.h>
diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c
index 90773c1395..ebe1948141 100644
--- a/source3/nmbd/nmbd_incomingrequests.c
+++ b/source3/nmbd/nmbd_incomingrequests.c
@@ -331,7 +331,7 @@ subnet %s - name not found.\n", nmb_namestr(&nmb->question.question_name),
/* this is not an exact calculation. the 46 is for the stats buffer
and the 60 is to leave room for the header etc */
- bufend = &rdata[MAX_DGRAM_SIZE] - (18 + 46 + 60);
+ bufend = &rdata[MAX_DGRAM_SIZE-1] - (18 + 46 + 60);
countptr = buf = rdata;
buf += 1;
buf0 = buf;