Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4a595cff
Commit
4a595cff
authored
Mar 25, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffserver/ctime1: avoid using strcpy()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ea4c99de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ffserver.c
ffserver.c
+3
-3
No files found.
ffserver.c
View file @
4a595cff
...
...
@@ -396,14 +396,14 @@ static int resolve_host(struct in_addr *sin_addr, const char *hostname)
return
0
;
}
static
char
*
ctime1
(
char
*
buf2
)
static
char
*
ctime1
(
char
*
buf2
,
int
buf_size
)
{
time_t
ti
;
char
*
p
;
ti
=
time
(
NULL
);
p
=
ctime
(
&
ti
);
strcpy
(
buf2
,
p
);
av_strlcpy
(
buf2
,
p
,
buf_size
);
p
=
buf2
+
strlen
(
p
)
-
1
;
if
(
*
p
==
'\n'
)
*
p
=
'\0'
;
...
...
@@ -416,7 +416,7 @@ static void http_vlog(const char *fmt, va_list vargs)
if
(
logfile
)
{
if
(
print_prefix
)
{
char
buf
[
32
];
ctime1
(
buf
);
ctime1
(
buf
,
sizeof
(
buf
)
);
fprintf
(
logfile
,
"%s "
,
buf
);
}
print_prefix
=
strstr
(
fmt
,
"
\n
"
)
!=
NULL
;
...
...
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