[PATCH] Fix for bug 5021
Jeremy Allison
jra at samba.org
Thu Nov 1 21:00:26 GMT 2007
On Sat, Oct 20, 2007 at 11:12:11AM +0200, Volker Lendecke wrote:
> 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;
> }
Pushed - thanks !
Jeremy.
More information about the samba-technical
mailing list