Handle endianness in x509_inet_pton_ipv6()
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
parent
7bd00e0708
commit
b255e21e48
1 changed files with 1 additions and 1 deletions
|
@ -2579,7 +2579,7 @@ static int x509_inet_pton_ipv6(const char *src, void *dst)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
if (j != 0) {
|
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') {
|
if (*v == '\0') {
|
||||||
break;
|
break;
|
||||||
} else if (*v == '.' && (i != 0 || dc != -1) && (i < 7) &&
|
} else if (*v == '.' && (i != 0 || dc != -1) && (i < 7) &&
|
||||||
|
|
Loading…
Reference in a new issue