summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-09 14:35:00 -0800
committerJeremy Allison <jra@samba.org>2008-01-09 14:35:00 -0800
commit318cbcfae51fc5dae549c60107d12480d8e478c8 (patch)
treeb2b44b8daf6b9a26b5984500ae337427e2a4caad
parente73e3da772bd024f1d74fc41b832f181ba5c43bd (diff)
downloadsamba-318cbcfae51fc5dae549c60107d12480d8e478c8.tar.gz
samba-318cbcfae51fc5dae549c60107d12480d8e478c8.tar.xz
samba-318cbcfae51fc5dae549c60107d12480d8e478c8.zip
Ensure we don't take address of one past buffer.
Jeremy.
-rw-r--r--source/nmbd/nmbd_incomingrequests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/nmbd/nmbd_incomingrequests.c b/source/nmbd/nmbd_incomingrequests.c
index 90773c13951..ebe19481410 100644
--- a/source/nmbd/nmbd_incomingrequests.c
+++ b/source/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;