diff options
-rw-r--r-- | source3/libsmb/clirap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index a703f453556..9b7f54c503b 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -204,6 +204,11 @@ int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32_t, goto done; } + if (rprcnt < 6) { + DBG_ERR("Got invalid result: rprcnt=%u\n", rprcnt); + goto done; + } + res = rparam? SVAL(rparam,0) : -1; if (res == 0 || res == ERRmoredata) { |