mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Make code clearer:
- if (hdr->size > SIZE_MAX - 1) + if (hdr->size == SIZE_MAX) OK nicm@
This commit is contained in:
parent
3686645e77
commit
49c776ea59
@ -73,7 +73,7 @@ client_msg_dispatch(struct client_ctx *cctx, char **error)
|
|||||||
int
|
int
|
||||||
client_msg_fn_error(struct hdr *hdr, struct client_ctx *cctx, char **error)
|
client_msg_fn_error(struct hdr *hdr, struct client_ctx *cctx, char **error)
|
||||||
{
|
{
|
||||||
if (hdr->size > SIZE_MAX - 1)
|
if (hdr->size == SIZE_MAX)
|
||||||
fatalx("bad MSG_ERROR size");
|
fatalx("bad MSG_ERROR size");
|
||||||
|
|
||||||
*error = xmalloc(hdr->size + 1);
|
*error = xmalloc(hdr->size + 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user