net: ip: copy to wrong destination in z_vrfy_net_addr_pton()

In function z_vrfy_net_addr_pton(),
the final copy should be to 'dst' variable not to 'src'

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
Alexandre Bourdiol 2020-07-01 09:17:32 +02:00 committed by Anas Nashif
commit 937482b4a7

View file

@ -482,7 +482,7 @@ int z_vrfy_net_addr_pton(sa_family_t family, const char *src,
return err;
}
Z_OOPS(z_user_to_copy((void *)src, addr, size));
Z_OOPS(z_user_to_copy((void *)dst, addr, size));
return 0;
}