summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}