Merge pull request #2144 from matt335672/remove_s_check
Remove s_check() macro
This commit is contained in:
commit
e1c6afa38e
@ -89,9 +89,6 @@ parser_stream_overflow_check(const struct stream *s, int n, int is_out,
|
|||||||
# define S_CHECK_REM_OUT(s,n)
|
# define S_CHECK_REM_OUT(s,n)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
#define s_check(s) s_check_rem(s, 0)
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
#define s_check_rem(s, n) ((s)->p + (n) <= (s)->end)
|
#define s_check_rem(s, n) ((s)->p + (n) <= (s)->end)
|
||||||
|
|
||||||
|
@ -1334,7 +1334,7 @@ clipboard_process_data_response(struct stream *s, int clip_msg_status,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
index = 0;
|
index = 0;
|
||||||
while (s_check(s))
|
while (s_check_rem(s, 2))
|
||||||
{
|
{
|
||||||
in_uint16_le(s, wchr);
|
in_uint16_le(s, wchr);
|
||||||
wtext[index] = wchr;
|
wtext[index] = wchr;
|
||||||
|
@ -575,7 +575,7 @@ handle_cb_format_data_response(struct vnc *v, struct stream *s)
|
|||||||
{
|
{
|
||||||
case CF_TEXT:
|
case CF_TEXT:
|
||||||
lastc = '\0';
|
lastc = '\0';
|
||||||
while (s_check(s))
|
while (s_check_rem(s, 1))
|
||||||
{
|
{
|
||||||
in_uint8(s, c);
|
in_uint8(s, c);
|
||||||
if (c == '\n' && lastc == '\r')
|
if (c == '\n' && lastc == '\r')
|
||||||
|
Loading…
Reference in New Issue
Block a user