Cast to size_t in bounds macros; drop resulting dead check
This commit is contained in:
+2
-2
@@ -186,7 +186,7 @@ unsigned int
|
|||||||
in_utf16_le_terminated_as_utf8_length(struct stream *s);
|
in_utf16_le_terminated_as_utf8_length(struct stream *s);
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
#define s_check_rem(s, n) ((n) <= (s)->end - (s)->p)
|
#define s_check_rem(s, n) ((size_t)(n) <= (size_t)((s)->end - (s)->p))
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
@@ -202,7 +202,7 @@ in_utf16_le_terminated_as_utf8_length(struct stream *s);
|
|||||||
&& 0 )
|
&& 0 )
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
#define s_check_rem_out(s, n) ((n) <= (s)->size - ((s)->p - (s)->data))
|
#define s_check_rem_out(s, n) ((size_t)(n) <= (size_t)((s)->size - ((s)->p - (s)->data)))
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -352,7 +352,7 @@ xrdp_mcs_parse_domain_params(struct xrdp_mcs *self, struct stream *s)
|
|||||||
|
|
||||||
in_uint8s(s, len); /* skip all fields */
|
in_uint8s(s, len); /* skip all fields */
|
||||||
|
|
||||||
return !s_check_rem_and_log(s, 0, "Parsing [ITU-T T.125] DomainParameters");
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user