Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
f4a87317
Commit
f4a87317
authored
Apr 29, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nul terminate
Might be a better idea to implement strlcpy()
parent
1cea7efd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
modules/access/smb.c
modules/access/smb.c
+5
-1
No files found.
modules/access/smb.c
View file @
f4a87317
...
...
@@ -458,14 +458,18 @@ static void Win32AddConnection( access_t *p_access, char *psz_path,
/* Find out server and share names */
strncpy
(
psz_server
,
psz_path
,
sizeof
(
psz_server
)
);
psz_server
[
sizeof
(
psz_server
)
-
1
]
=
'\0'
;
psz_share
[
0
]
=
0
;
psz_parser
=
strchr
(
psz_path
,
'/'
);
if
(
psz_parser
)
{
char
*
psz_parser2
=
strchr
(
++
psz_parser
,
'/'
);
if
(
psz_parser2
)
{
strncpy
(
psz_share
,
psz_parser
,
sizeof
(
psz_share
)
);
}
psz_parse
[
sizeof
(
psz_parse
)
-
1
]
=
'\0'
;
}
}
sprintf
(
psz_remote
,
"
\\\\
%s
\\
%s"
,
psz_server
,
psz_share
);
net_resource
.
lpRemoteName
=
psz_remote
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment