Fixed a SIGSEGV with xorriso -version run
This commit is contained in:
parent
d4216fe27e
commit
a30704318f
@ -1725,6 +1725,7 @@ static char Xorriso_sys_rc_nameS[Xorriso_rc_nuM][80]= {
|
|||||||
"placeholder for $HOME/.xorrisorc"
|
"placeholder for $HOME/.xorrisorc"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -1733,6 +1734,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
|||||||
*xorriso= m= TSOB_FELD(struct XorrisO,1);
|
*xorriso= m= TSOB_FELD(struct XorrisO,1);
|
||||||
if(m==NULL)
|
if(m==NULL)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
m->libs_are_started= 0;
|
||||||
strncpy(m->progname,progname,sizeof(m->progname)-1);
|
strncpy(m->progname,progname,sizeof(m->progname)-1);
|
||||||
m->progname[sizeof(m->progname)-1]= 0;
|
m->progname[sizeof(m->progname)-1]= 0;
|
||||||
if(getcwd(m->initial_wdx,sizeof(m->initial_wdx)-1)==NULL)
|
if(getcwd(m->initial_wdx,sizeof(m->initial_wdx)-1)==NULL)
|
||||||
@ -4980,7 +4982,7 @@ int Xorriso_main(int argc, char **argv)
|
|||||||
|
|
||||||
/* The prescan of arguments performs actions which have to happen before
|
/* The prescan of arguments performs actions which have to happen before
|
||||||
the normal processing of startup files and arguments. Currently:
|
the normal processing of startup files and arguments. Currently:
|
||||||
-no_rc and single-argumenti runs like -help or -version.
|
-no_rc and single-argument runs like -help or -version.
|
||||||
*/
|
*/
|
||||||
ret= Xorriso_prescan_args(xorriso,argc,argv,0);
|
ret= Xorriso_prescan_args(xorriso,argc,argv,0);
|
||||||
if(ret==0)
|
if(ret==0)
|
||||||
|
@ -47,6 +47,8 @@ typedef int (*Cleanup_app_handler_T)();
|
|||||||
|
|
||||||
struct XorrisO { /* the global context of xorriso */
|
struct XorrisO { /* the global context of xorriso */
|
||||||
|
|
||||||
|
int libs_are_started;
|
||||||
|
|
||||||
/* source */
|
/* source */
|
||||||
char progname[SfileadrL];
|
char progname[SfileadrL];
|
||||||
char initial_wdx[SfileadrL];
|
char initial_wdx[SfileadrL];
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2007.10.18.183200"
|
#define Xorriso_timestamP "2007.10.18.185731"
|
||||||
|
@ -63,12 +63,12 @@ int Xorriso_startup_libraries(struct XorrisO *xorriso, int flag)
|
|||||||
}
|
}
|
||||||
ret= isoburn_initialize();
|
ret= isoburn_initialize();
|
||||||
if(ret==0) {
|
if(ret==0) {
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
|
||||||
sprintf(xorriso->info_text, "Cannot initialize libraries");
|
sprintf(xorriso->info_text, "Cannot initialize libraries");
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||||
free(handler_prefix);
|
free(handler_prefix);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
xorriso->libs_are_started= 1;
|
||||||
|
|
||||||
queue_sev= "DEBUG";
|
queue_sev= "DEBUG";
|
||||||
if(xorriso->library_msg_direct_print) {
|
if(xorriso->library_msg_direct_print) {
|
||||||
@ -505,6 +505,8 @@ int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag)
|
|||||||
int ret, error_code= 0, os_errno= 0, count= 0, pass;
|
int ret, error_code= 0, os_errno= 0, count= 0, pass;
|
||||||
char severity[80];
|
char severity[80];
|
||||||
|
|
||||||
|
if(!xorriso->libs_are_started)
|
||||||
|
return(1);
|
||||||
for(pass= 0; pass< 2; pass++) {
|
for(pass= 0; pass< 2; pass++) {
|
||||||
while(1) {
|
while(1) {
|
||||||
if(pass==0)
|
if(pass==0)
|
||||||
|
Loading…
Reference in New Issue
Block a user