Skip to content

Commit 2ae6cac

Browse files
mardyDacoTaco
authored andcommitted
net_getsockname: do not dereference a NULL pointer
This very same check is present a couple of lines below, so there's no point in repeating it. In any case the check must be done after checking that the pointer is not NULL (which is done below).
1 parent fbc8f2e commit 2ae6cac

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

libogc/network_wii.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,6 @@ s32 net_getsockname(s32 s, struct sockaddr *addr, socklen_t *addrlen)
11391139
s32 ret;
11401140

11411141
if (net_ip_top_fd < 0) return -ENXIO;
1142-
if (*addrlen<8) return -ENOMEM;
11431142

11441143
if (!addr) return -EINVAL;
11451144
if (!addrlen) return -EINVAL;

0 commit comments

Comments
 (0)