diff options
Diffstat (limited to 'miscutils/conspy.c')
-rw-r--r-- | miscutils/conspy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/miscutils/conspy.c b/miscutils/conspy.c index 1a46a4340..0d96a5f9a 100644 --- a/miscutils/conspy.c +++ b/miscutils/conspy.c | |||
@@ -42,6 +42,7 @@ | |||
42 | //usage: "\n -y LINE Starting line" | 42 | //usage: "\n -y LINE Starting line" |
43 | 43 | ||
44 | #include "libbb.h" | 44 | #include "libbb.h" |
45 | #include "common_bufsiz.h" | ||
45 | #include <sys/kd.h> | 46 | #include <sys/kd.h> |
46 | 47 | ||
47 | #define ESC "\033" | 48 | #define ESC "\033" |
@@ -363,7 +364,8 @@ int conspy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |||
363 | int conspy_main(int argc UNUSED_PARAM, char **argv) | 364 | int conspy_main(int argc UNUSED_PARAM, char **argv) |
364 | { | 365 | { |
365 | char tty_name[sizeof(DEV_TTY "NN")]; | 366 | char tty_name[sizeof(DEV_TTY "NN")]; |
366 | #define keybuf bb_common_bufsiz1 | 367 | #define keybuf bb_common_bufsiz1 |
368 | #define sizeof_keybuf COMMON_BUFSIZE | ||
367 | struct termios termbuf; | 369 | struct termios termbuf; |
368 | unsigned opts; | 370 | unsigned opts; |
369 | unsigned ttynum; | 371 | unsigned ttynum; |
@@ -513,7 +515,7 @@ int conspy_main(int argc UNUSED_PARAM, char **argv) | |||
513 | default: | 515 | default: |
514 | // Read the keys pressed | 516 | // Read the keys pressed |
515 | k = keybuf + G.key_count; | 517 | k = keybuf + G.key_count; |
516 | bytes_read = read(G.kbd_fd, k, sizeof(keybuf) - G.key_count); | 518 | bytes_read = read(G.kbd_fd, k, sizeof_keybuf - G.key_count); |
517 | if (bytes_read < 0) | 519 | if (bytes_read < 0) |
518 | goto abort; | 520 | goto abort; |
519 | 521 | ||