mirror of https://github.com/MidnightCommander/mc
* util_nt.c (check_error_pipe): Use "%s" in message () to
prevent possible crash. (close_error_pipe): Likewise. Don't use C++ comment.
This commit is contained in:
parent
9e174e05f6
commit
e48fe64e95
|
@ -1,3 +1,9 @@
|
|||
2002-07-01 Andrew V. Samoilov <kai@cmail.ru>
|
||||
|
||||
* util_nt.c (check_error_pipe): Use "%s" in message () to
|
||||
prevent possible crash.
|
||||
(close_error_pipe): Likewise. Don't use C++ comment.
|
||||
|
||||
2002-06-04 Andrew V. Samoilov <kai@cmail.ru>
|
||||
|
||||
* key_nt.c (define_sequence): Adjust for declaration.
|
||||
|
|
|
@ -103,7 +103,7 @@ int close_error_pipe (int error, char *text)
|
|||
if (len == 0) return 0; /* Nothing to show */
|
||||
|
||||
/* Show message from pipe */
|
||||
message (error, title, msg);
|
||||
message (error, title, "%s", msg);
|
||||
} else {
|
||||
/* Show given text and possible message from pipe */
|
||||
message (error, title, " %s \n %s ", text, msg);
|
||||
|
@ -120,7 +120,7 @@ void check_error_pipe (void)
|
|||
{
|
||||
int rvalue;
|
||||
|
||||
rvalue = -1; // read (error_pipe[0], error + len, 1);
|
||||
rvalue = -1; /* read (error_pipe[0], error + len, 1); */
|
||||
if (rvalue <= 0)
|
||||
break;
|
||||
len ++;
|
||||
|
@ -129,7 +129,7 @@ void check_error_pipe (void)
|
|||
close (error_pipe[0]);
|
||||
}
|
||||
if (len > 0)
|
||||
message (0, " Warning ", error);
|
||||
message (0, " Warning ", "%s", error);
|
||||
}
|
||||
|
||||
int my_system (int as_shell_command, const char *shell, const char *command)
|
||||
|
|
Loading…
Reference in New Issue