[PATCH] Fix for bug 5021
Volker Lendecke
vl at sernet.de
Sat Oct 20 09:12:11 GMT 2007
This is a different fix than the bug reporter (Evgeniy Dushistov
<dushistov at mail.ru>, thanks!) created, but it lives without the boolean
status variable. Untested so far, but I can not add attachments to bugs right
now. But to me this looks really obvious.
---
source/libsmb/libsmbclient.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c
index 3b5818a..c2a3fc6 100644
--- a/source/libsmb/libsmbclient.c
+++ b/source/libsmb/libsmbclient.c
@@ -2671,7 +2671,11 @@ smbc_opendir_ctx(SMBCCTX *context,
return NULL;
}
- ip_list = &server_addr;
+ ip_list = memdup(&server_addr, sizeof(server_addr));
+ if (ip_list == NULL) {
+ errno = ENOMEM;
+ return NULL;
+ }
count = 1;
}
--
1.5.3.4
More information about the samba-technical
mailing list