From a7863f0f033b31838a53960e9f616d9a82081ecf Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 12 Aug 2001 23:53:26 +0000 Subject: [PATCH] Fixed crash bug when attempting to list contents of non-existent directory. --- source/libsmb/clilist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/libsmb/clilist.c b/source/libsmb/clilist.c index 609f5f23315..a7ba1c07adf 100644 --- a/source/libsmb/clilist.c +++ b/source/libsmb/clilist.c @@ -216,6 +216,9 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, continue; } + if (cli_is_error(cli)) + return -1; + if (total_received == -1) total_received = 0; /* parse out some important return info */