Clarified handling of NULL name with Xorriso_set_local_charset(). Coverity CID 28719.
This commit is contained in:
parent
867da57934
commit
f7f98d9d83
@ -474,14 +474,14 @@ int Xorriso_set_local_charset(struct XorrisO *xorriso, char *name, int flag)
|
|||||||
nl_charset= nl_langinfo(CODESET);
|
nl_charset= nl_langinfo(CODESET);
|
||||||
if(name == NULL)
|
if(name == NULL)
|
||||||
name= nl_charset;
|
name= nl_charset;
|
||||||
|
if(name == NULL)
|
||||||
|
goto cannot;
|
||||||
|
|
||||||
if(name != NULL) {
|
|
||||||
iconv_ret= iconv_open(nl_charset, name);
|
iconv_ret= iconv_open(nl_charset, name);
|
||||||
if(iconv_ret == (iconv_t) -1)
|
if(iconv_ret == (iconv_t) -1)
|
||||||
goto cannot;
|
goto cannot;
|
||||||
else
|
else
|
||||||
iconv_close(iconv_ret);
|
iconv_close(iconv_ret);
|
||||||
}
|
|
||||||
ret= iso_set_local_charset(name, 0);
|
ret= iso_set_local_charset(name, 0);
|
||||||
if(ret <= 0) {
|
if(ret <= 0) {
|
||||||
cannot:;
|
cannot:;
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2015.11.09.105122"
|
#define Xorriso_timestamP "2015.11.09.121421"
|
||||||
|
Loading…
Reference in New Issue
Block a user