Contents of /trunk/samba/patches/samba-3.0.27-invalid-free-fix.patch
Parent Directory | Revision Log
Revision 417 -
(show annotations)
(download)
Sat Nov 17 13:16:52 2007 UTC (16 years, 10 months ago) by niro
File size: 541 byte(s)
Sat Nov 17 13:16:52 2007 UTC (16 years, 10 months ago) by niro
File size: 541 byte(s)
-fixes an invalid pointer - see upstream bug #5021
1 | diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c |
2 | index 80b09fa..374a86a 100644 |
3 | --- a/source/libsmb/libsmbclient.c |
4 | +++ b/source/libsmb/libsmbclient.c |
5 | @@ -2644,7 +2644,11 @@ smbc_opendir_ctx(SMBCCTX *context, |
6 | return NULL; |
7 | } |
8 | |
9 | - ip_list = &server_addr; |
10 | + ip_list = memdup(&server_addr, sizeof(server_addr)); |
11 | + if (ip_list == NULL) { |
12 | + errno = ENOMEM; |
13 | + return NULL; |
14 | + } |
15 | count = 1; |
16 | } |
17 |