Prevented use of uninitialized variable in case of memory shortage. Coverity CID 28806.

This commit is contained in:
Thomas Schmitt 2015-11-06 12:47:31 +00:00
parent 0aad592dca
commit cc2d7941a1
2 changed files with 4 additions and 3 deletions

View File

@ -4381,6 +4381,9 @@ int Xorriso_named_pipe_loop(struct XorrisO *xorriso,
"standard input", "standard output", "standard error" };
char mem_text[80], limit_text[80];
for(i= 0; i < 3; i++ )
mem_fds[i]= pipe_fds[i]= -1;
if(xorriso->tolerate_stdin_eof) {
sprintf(xorriso->info_text,
"Already in -named_pipe_loop. Ignoring further -named_pipe_loop command.");
@ -4389,8 +4392,6 @@ int Xorriso_named_pipe_loop(struct XorrisO *xorriso,
}
Xorriso_alloc_meM(line, char, SfileadrL);
for(i= 0; i < 3; i++ )
mem_fds[i]= pipe_fds[i]= -1;
/* Memorize stdin, stdout, and stderr. Close originals. */
for(i= 0; i < 3; i++ ) {

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.06.124252"
#define Xorriso_timestamP "2015.11.06.124702"