Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
b67a5864
Commit
b67a5864
authored
Apr 18, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch unsafe (but alas common) strerror()
parent
c3750154
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
bin/override.c
bin/override.c
+15
-0
No files found.
bin/override.c
View file @
b67a5864
...
...
@@ -33,6 +33,7 @@ void vlc_enable_override (void);
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
#include <pthread.h>
#ifdef HAVE_EXECINFO_H
...
...
@@ -260,6 +261,20 @@ char *setlocale (int cat, const char *locale)
}
/* strerror() is not thread-safe in theory (POSIX), nor in practice (glibc).
* This caused quite nasty crashes in the history of VLC/Linux. */
char
*
strerror
(
int
val
)
{
if
(
override
)
{
static
const
char
msg
[]
=
"Error message unavailable (use strerror_r instead of strerror)!"
;
LOG
(
"Blocked"
,
"%d"
,
val
);
return
(
char
*
)
msg
;
}
return
CALL
(
strerror
,
val
);
}
/*** Xlib ****/
#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
...
...
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