[vlc-devel] commit: Fix a segfault (buffer overflow for win32 only). ( Rémi Duraffort )
git version control
git at videolan.org
Wed Jun 24 16:40:49 CEST 2009
vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Wed Jun 24 16:20:40 2009 +0200| [1e924a437e160e9da1255c72b040a68b248eadbf] | committer: Rémi Duraffort
Fix a segfault (buffer overflow for win32 only).
(cherry picked from commit e60a9038b13b5eb805a76755efc5c6d5e080180f)
Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e924a437e160e9da1255c72b040a68b248eadbf
---
modules/access/smb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/access/smb.c b/modules/access/smb.c
index 3a572e2..c5eef5a 100644
--- a/modules/access/smb.c
+++ b/modules/access/smb.c
@@ -473,7 +473,7 @@ static void Win32AddConnection( access_t *p_access, char *psz_path,
strlcpy( psz_share, psz_parser, sizeof( psz_share ) );
}
- sprintf( psz_remote, "\\\\%s\\%s", psz_server, psz_share );
+ snprintf( psz_remote, sizeof( psz_remote ), "\\\\%s\\%s", psz_server, psz_share );
net_resource.lpRemoteName = psz_remote;
i_result = OurWNetAddConnection2( &net_resource, psz_pwd, psz_user, 0 );
More information about the vlc-devel
mailing list