diff options
author | Jeremy Allison <jra@samba.org> | 2008-02-08 10:07:05 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-02-08 10:07:05 -0800 |
commit | c0e92cd4b8eae573848dc1587eecd2946715d754 (patch) | |
tree | 6983e90e2a117cfe4da0440958e958aead5d1352 /source3/libsmb/clirap.c | |
parent | 400ac70117ad48d729f33931e9baaee40e46bf38 (diff) | |
download | samba-c0e92cd4b8eae573848dc1587eecd2946715d754.tar.gz samba-c0e92cd4b8eae573848dc1587eecd2946715d754.tar.xz samba-c0e92cd4b8eae573848dc1587eecd2946715d754.zip |
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)
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r-- | source3/libsmb/clirap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index 4c5e338606f..8c167e1257d 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 && |