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
9f1f7af1
Commit
9f1f7af1
authored
Aug 03, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle NULL pointer properly in Unicode conversion thingy
parent
53d6bb5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
src/libvlc.c
src/libvlc.c
+20
-8
No files found.
src/libvlc.c
View file @
9f1f7af1
...
@@ -1891,6 +1891,9 @@ char *FromLocale( const char *locale )
...
@@ -1891,6 +1891,9 @@ char *FromLocale( const char *locale )
{
{
char
*
psz_charset
;
char
*
psz_charset
;
if
(
locale
==
NULL
)
return
NULL
;
if
(
!
vlc_current_charset
(
&
psz_charset
)
)
if
(
!
vlc_current_charset
(
&
psz_charset
)
)
{
{
char
*
iptr
=
(
ICONV_CONST
char
*
)
locale
,
*
output
,
*
optr
;
char
*
iptr
=
(
ICONV_CONST
char
*
)
locale
,
*
output
,
*
optr
;
...
@@ -1928,6 +1931,9 @@ char *ToLocale( const char *utf8 )
...
@@ -1928,6 +1931,9 @@ char *ToLocale( const char *utf8 )
{
{
char
*
psz_charset
;
char
*
psz_charset
;
if
(
utf8
==
NULL
)
return
NULL
;
if
(
!
vlc_current_charset
(
&
psz_charset
)
)
if
(
!
vlc_current_charset
(
&
psz_charset
)
)
{
{
char
*
iptr
=
(
ICONV_CONST
char
*
)
utf8
,
*
output
,
*
optr
;
char
*
iptr
=
(
ICONV_CONST
char
*
)
utf8
,
*
output
,
*
optr
;
...
@@ -1959,13 +1965,16 @@ char *ToLocale( const char *utf8 )
...
@@ -1959,13 +1965,16 @@ char *ToLocale( const char *utf8 )
void
LocaleFree
(
const
char
*
str
)
void
LocaleFree
(
const
char
*
str
)
{
{
/* FIXME: this deserve a price for the most inefficient peice of code */
if
(
str
!=
NULL
)
char
*
psz_charset
;
{
/* FIXME: this deserve a price for the most inefficient peice of code */
if
(
!
vlc_current_charset
(
&
psz_charset
)
)
char
*
psz_charset
;
free
(
(
char
*
)
str
);
if
(
!
vlc_current_charset
(
&
psz_charset
)
)
free
(
psz_charset
);
free
(
(
char
*
)
str
);
free
(
psz_charset
);
}
}
}
/* FIXME: don't use iconv at all */
/* FIXME: don't use iconv at all */
...
@@ -1974,7 +1983,10 @@ char *EnsureUTF8( char *str )
...
@@ -1974,7 +1983,10 @@ char *EnsureUTF8( char *str )
vlc_iconv_t
hd
;
vlc_iconv_t
hd
;
size_t
inb
,
outb
;
size_t
inb
,
outb
;
char
*
ostr
,
*
istr
;
char
*
ostr
,
*
istr
;
if
(
str
==
NULL
)
return
NULL
;
ostr
=
istr
=
str
;
ostr
=
istr
=
str
;
inb
=
outb
=
strlen
(
str
);
inb
=
outb
=
strlen
(
str
);
...
...
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