Remove s_check() macro

This commit is contained in:
matt335672 2022-02-09 10:18:15 +00:00
parent a13742f097
commit e6c098e750
3 changed files with 2 additions and 5 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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')