Improved handling of potential program error with -msg_op read_sieve. Coverity CID 28723.
This commit is contained in:
parent
9a5cd3f4f0
commit
e1c44a464a
@ -1954,8 +1954,7 @@ int Xorriso_sieve_get_result(struct XorrisO *xorriso, char *name,
|
||||
}
|
||||
if(f->next_to_deliver == NULL) {
|
||||
/* Should not happen */
|
||||
*available= 0;
|
||||
break;
|
||||
goto unexpected_null;
|
||||
}
|
||||
if(f->num_words <= 0)
|
||||
return(1);
|
||||
@ -1974,9 +1973,15 @@ int Xorriso_sieve_get_result(struct XorrisO *xorriso, char *name,
|
||||
if((*argv)[i] == NULL)
|
||||
goto no_mem;
|
||||
} else {
|
||||
|
||||
/* >>> ??? should not happen */;
|
||||
|
||||
/* should not happen */
|
||||
unexpected_null:;
|
||||
Xorriso_msgs_submit(xorriso, 0,
|
||||
"Program error: Unexpected NULL pointer in message sieve.",
|
||||
0, "WARNING", 0);
|
||||
if(*argv != NULL)
|
||||
Xorriso__dispose_words(argc, argv);
|
||||
*available= 0;
|
||||
return(-2);
|
||||
}
|
||||
lst= Xorriso_lst_get_next(lst, 0);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2015.11.09.133135"
|
||||
#define Xorriso_timestamP "2015.11.10.084903"
|
||||
|
Loading…
Reference in New Issue
Block a user