summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-02-09 12:17:08 -0800
committerKarolin Seeger <kseeger@samba.org>2010-02-24 16:25:10 +0100
commit56c764a2d168a8cd3627e7d551e5eb802af48756 (patch)
tree37ad130e0e252fb9525f8abfbc4ee1560220bc87
parent02f866afccc37ddc7ad4f8bd3ea201d86a94763f (diff)
downloadsamba-56c764a2d168a8cd3627e7d551e5eb802af48756.tar.gz
samba-56c764a2d168a8cd3627e7d551e5eb802af48756.tar.xz
samba-56c764a2d168a8cd3627e7d551e5eb802af48756.zip
Fix off-by-one error in working out the limit of the NetServerEnum comment.
Jeremy. (cherry picked from commit 9ad6f432f3f5844b4b419e7cbaf3c3e70b052d29) Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 8cac1af47cad9d40b0ab86cda3674f4420507008)
-rw-r--r--source/libsmb/clirap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c
index 116e0a91759..ea9e439f1b1 100644
--- a/source/libsmb/clirap.c
+++ b/source/libsmb/clirap.c
@@ -389,7 +389,7 @@ bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
comment_offset = (IVAL(p,22) & 0xFFFF)-converter;
cmnt = comment_offset?(rdata+comment_offset):"";
- if (comment_offset < 0 || comment_offset > (int)rdrcnt) {
+ if (comment_offset < 0 || comment_offset >= (int)rdrcnt) {
TALLOC_FREE(frame);
continue;
}