mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-15 19:20:55 +00:00
Handle endianness in x509_inet_pton_ipv6()
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
parent
7bd00e0708
commit
b255e21e48
@ -2579,7 +2579,7 @@ static int x509_inet_pton_ipv6(const char *src, void *dst)
|
||||
;
|
||||
}
|
||||
if (j != 0) {
|
||||
addr[i++] = (x << 8) | (x >> 8); /* htons(x) */
|
||||
addr[i++] = MBEDTLS_IS_BIG_ENDIAN ? x : (x << 8) | (x >> 8);
|
||||
if (*v == '\0') {
|
||||
break;
|
||||
} else if (*v == '.' && (i != 0 || dc != -1) && (i < 7) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user