From f030e761f1d4a68429694ebf56678d43dc0d2ff6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Feb 2010 12:17:08 -0800 Subject: [PATCH] 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 (cherry picked from commit 026f05839b6dbdeb5be3953930a28f7650c1e1da) --- source3/libsmb/clirap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index 36b137e45d7..2abb550ab29 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -366,7 +366,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; } -- 2.11.4.GIT