From 9ad6f432f3f5844b4b419e7cbaf3c3e70b052d29 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. --- source/libsmb/clirap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c index 7f6dbf5..990b806 100644 --- a/source/libsmb/clirap.c +++ b/source/libsmb/clirap.c @@ -367,7 +367,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; } -- 1.6.6