projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix buffer overflow in linear regression.
[pspp]
/
src
/
ui
/
terminal
/
terminal-reader.c
diff --git
a/src/ui/terminal/terminal-reader.c
b/src/ui/terminal/terminal-reader.c
index 2f2a533d1577f4d6cf46a95e3f60cd1b26ce7dd8..c23fad186f86992b164b401792ed3a1300f1706c 100644
(file)
--- a/
src/ui/terminal/terminal-reader.c
+++ b/
src/ui/terminal/terminal-reader.c
@@
-264,13
+264,13
@@
interruptible_getc (FILE *fp)
max_fd = (max_fd > fd) ? max_fd : fd;
FD_SET (fd, &what);
ret = select (max_fd + 1, &what, NULL, NULL, &timeout);
max_fd = (max_fd > fd) ? max_fd : fd;
FD_SET (fd, &what);
ret = select (max_fd + 1, &what, NULL, NULL, &timeout);
- if (
ret == -1 && errno != EINTR)
+ if (ret == -1 && errno != EINTR)
{
perror ("Select failed");
continue;
}
{
perror ("Select failed");
continue;
}
- if (ret > 0
)
+ if (ret > 0)
{
if (FD_ISSET (pfd[0], &what))
{
{
if (FD_ISSET (pfd[0], &what))
{
@@
-302,10
+302,10
@@
handler (int sig)
static void
readline_init (void)
{
static void
readline_init (void)
{
- if (
0 != pipe2 (pfd, O_NONBLOCK))
+ if (0 != pipe2 (pfd, O_NONBLOCK))
perror ("Cannot create pipe");
perror ("Cannot create pipe");
- if (
SIG_ERR == signal (SIGINT, handler))
+ if (SIG_ERR == signal (SIGINT, handler))
perror ("Cannot add signal handler");
rl_catch_signals = 0;
perror ("Cannot add signal handler");
rl_catch_signals = 0;
@@
-327,7
+327,7
@@
readline_init (void)
static void
readline_done (void)
{
static void
readline_done (void)
{
- if (history_file != NULL && false == settings_get_testing_mode ()
)
+ if (history_file != NULL && false == settings_get_testing_mode ())
write_history (history_file);
clear_history ();
free (history_file);
write_history (history_file);
clear_history ();
free (history_file);