From c0e92cd4b8eae573848dc1587eecd2946715d754 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 8 Feb 2008 10:07:05 -0800 Subject: Fix bug reported on IRC enumerating shares with OS/2. Report and fix from kukks (thanks once again !). Jeremy. (This used to be commit 3ca58b792fb10ff2a4c25283c587f8270ed82d74) --- source3/libsmb/clirap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/libsmb/clirap.c') diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index 4c5e338606..8c167e1257 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -191,12 +191,13 @@ int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, co sname = p; type = SVAL(p,14); - comment_offset = IVAL(p,16) & 0xFFFF; - if (comment_offset < 0 || comment_offset > (int)rdrcnt) { + comment_offset = (IVAL(p,16) & 0xFFFF) - converter; + if (comment_offset < 0 || + comment_offset > (int)rdrcnt) { TALLOC_FREE(frame); break; } - cmnt = comment_offset?(rdata+comment_offset-converter):""; + cmnt = comment_offset?(rdata+comment_offset):""; /* Work out the comment length. */ for (p1 = cmnt, len = 0; *p1 && -- cgit