summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2015-08-20 22:32:42 +0000
committerDamien Miller <djm@mindrot.org>2015-08-21 13:43:25 +1000
commitce445b0ed927e45bd5bdce8f836eb353998dd65c (patch)
tree34170a772ddf573879b8ae244bafd6871be0fd11 /packet.c
parent05291e5288704d1a98bacda269eb5a0153599146 (diff)
upstream commit
Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope ok krw millert Upstream-ID: 5e50ded78cadf3841556649a16cc4b1cb6c58667
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index 6008c2d94..01d3e2970 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.213 2015/07/29 04:43:06 djm Exp $ */ 1/* $OpenBSD: packet.c,v 1.214 2015/08/20 22:32:42 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1272,7 +1272,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
1272 1272
1273 DBG(debug("packet_read()")); 1273 DBG(debug("packet_read()"));
1274 1274
1275 setp = (fd_set *)calloc(howmany(state->connection_in + 1, 1275 setp = calloc(howmany(state->connection_in + 1,
1276 NFDBITS), sizeof(fd_mask)); 1276 NFDBITS), sizeof(fd_mask));
1277 if (setp == NULL) 1277 if (setp == NULL)
1278 return SSH_ERR_ALLOC_FAIL; 1278 return SSH_ERR_ALLOC_FAIL;
@@ -2036,7 +2036,7 @@ ssh_packet_write_wait(struct ssh *ssh)
2036 struct timeval start, timeout, *timeoutp = NULL; 2036 struct timeval start, timeout, *timeoutp = NULL;
2037 struct session_state *state = ssh->state; 2037 struct session_state *state = ssh->state;
2038 2038
2039 setp = (fd_set *)calloc(howmany(state->connection_out + 1, 2039 setp = calloc(howmany(state->connection_out + 1,
2040 NFDBITS), sizeof(fd_mask)); 2040 NFDBITS), sizeof(fd_mask));
2041 if (setp == NULL) 2041 if (setp == NULL)
2042 return SSH_ERR_ALLOC_FAIL; 2042 return SSH_ERR_ALLOC_FAIL;