diff options
Diffstat (limited to 'tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp')
-rw-r--r-- | tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp index 04d7268f06..c0a738e22d 100644 --- a/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp +++ b/tests/auto/corelib/io/qipaddress/tst_qipaddress.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 Intel Corporation. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #define _CRT_SECURE_NO_WARNINGS 1 @@ -70,7 +70,7 @@ namespace QTest { char *toString(const Ip6 &ip6) { char buf[sizeof "1111:2222:3333:4444:5555:6666:7777:8888" + 2]; - sprintf(buf, "%x:%x:%x:%x:%x:%x:%x:%x", + snprintf(buf, sizeof(buf), "%x:%x:%x:%x:%x:%x:%x:%x", ip6.u8[0] << 8 | ip6.u8[1], ip6.u8[2] << 8 | ip6.u8[3], ip6.u8[4] << 8 | ip6.u8[5], |