diff --git a/common/parse.h b/common/parse.h index b27bb0c9..a3721ef8 100644 --- a/common/parse.h +++ b/common/parse.h @@ -89,9 +89,6 @@ parser_stream_overflow_check(const struct stream *s, int n, int is_out, # define S_CHECK_REM_OUT(s,n) #endif -/******************************************************************************/ -#define s_check(s) s_check_rem(s, 0) - /******************************************************************************/ #define s_check_rem(s, n) ((s)->p + (n) <= (s)->end) diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index e2a716ef..d5422483 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -1334,7 +1334,7 @@ clipboard_process_data_response(struct stream *s, int clip_msg_status, return 0; } index = 0; - while (s_check(s)) + while (s_check_rem(s, 2)) { in_uint16_le(s, wchr); wtext[index] = wchr; diff --git a/vnc/vnc_clip.c b/vnc/vnc_clip.c index ebbfae36..364bdff7 100644 --- a/vnc/vnc_clip.c +++ b/vnc/vnc_clip.c @@ -575,7 +575,7 @@ handle_cb_format_data_response(struct vnc *v, struct stream *s) { case CF_TEXT: lastc = '\0'; - while (s_check(s)) + while (s_check_rem(s, 1)) { in_uint8(s, c); if (c == '\n' && lastc == '\r')