Skip to content
Snippets Groups Projects
Commit 8831e41f authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Fix CID 187212 and CID 187186.

parent 282a7bc4
No related branches found
No related tags found
No related merge requests found
......@@ -6523,9 +6523,9 @@ static int syscall_sctp_getpaddrs(struct state *state, struct syscall_spec *sysc
goto error_out;
}
if (live_addr->sa_family == AF_INET) {
live_addr = (struct sockaddr *)((caddr_t*)live_addr) + sizeof(struct sockaddr_in);
live_addr = (struct sockaddr *)((caddr_t *)live_addr + sizeof(struct sockaddr_in));
} else if (live_addr->sa_family == AF_INET6) {
live_addr = (struct sockaddr *)((caddr_t*)live_addr) + sizeof(struct sockaddr_in6);
live_addr = (struct sockaddr *)((caddr_t *)live_addr + sizeof(struct sockaddr_in6));
} else {
asprintf(error, "Bad Type of addrs[%d]", i);
goto error_out;
......@@ -6608,9 +6608,9 @@ static int syscall_sctp_getladdrs(struct state *state, struct syscall_spec *sysc
goto error_out;
}
if (live_addr->sa_family == AF_INET) {
live_addr = (struct sockaddr *)((caddr_t*)live_addr) + sizeof(struct sockaddr_in);
live_addr = (struct sockaddr *)((caddr_t *)live_addr + sizeof(struct sockaddr_in));
} else if (live_addr->sa_family == AF_INET6) {
live_addr = (struct sockaddr *)((caddr_t*)live_addr) + sizeof(struct sockaddr_in6);
live_addr = (struct sockaddr *)((caddr_t *)live_addr + sizeof(struct sockaddr_in6));
} else {
asprintf(error, "Bad Type of addrs[%d]", i);
goto error_out;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment