Skip to content

Commit

Permalink
gnrc_sock_ip: fix NULL pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Sep 7, 2020
1 parent a6449af commit b187917
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/net/gnrc/sock/ip/gnrc_sock_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ ssize_t sock_ip_send(sock_ip_t *sock, const void *data, size_t len,
gnrc_ep_set(&rem, remote, sizeof(rem));
}
if ((remote != NULL) && (remote->family == AF_UNSPEC) &&
(sock->remote.family != AF_UNSPEC)) {
(sock != NULL) && (sock->remote.family != AF_UNSPEC)) {
/* remote was set on create so take its family */
rem.family = sock->remote.family;
}
Expand Down

0 comments on commit b187917

Please sign in to comment.