Skip to contentSkip to conversation

Bug#1143682: openvpn3-client: FTBFS: ../openvpn3-core/openvpn/common/unicode-impl.hpp:596:47: error: array subscript 6 is above array bounds of 'const openvpn::Unicode::UTF32 [6]' {aka 'const unsigned int [6]'} [-Werror=array-bounds=]

Openvpn-devel Marc Leeman 2 participants 3 messages Aug 5 – Aug 14 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

---------- Forwarded message ---------
From: Santiago Vila <[email protected]>
Date: Wed, 5 Aug 2026 at 13:25
Subject: Bug#1143682: openvpn3-client: FTBFS:
../openvpn3-core/openvpn/common/unicode-impl.hpp:596:47: error: array subscript 6 is above array bounds of 'const openvpn::Unicode::UTF32 [6]' {aka 'const unsigned int [6]'} [-Werror=array-bounds=]
To: Debian BTS <[email protected]>

Package: src:openvpn3-client
Version: 27.1+dfsg-1
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most relevant part, but not necessarily). If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202608/

About the archive rebuild: The build was made on virtual machines from AWS, using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I am willing to provide ssh access to a virtual machine where the bug is fully reproducible.

If this is really a bug in one of the build-depends, please use reassign and add an affects on src:openvpn3-client, so that this is still visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
[91/246] c++ -Isrc/client/openvpn3-service-client.p -Isrc/cl [too-long-redacted] ent/openvpn3-service-client.cpp
FAILED: [code=1] src/client/openvpn3-service-client.p/openvpn3-service-client.cpp.o c++ -Isrc/client/openvpn3-service-client.p -Isrc/client -I.. [too-long-redacted] ent/openvpn3-service-client.cpp
In file included from ../openvpn3-core/openvpn/common/unicode.hpp:25,

                 from ../openvpn3-core/openvpn/common/options.hpp:56,
                 from ../openvpn3-core/openvpn/tun/tunmtu.hpp:15,
                 from ../src/client/core-client.hpp:40,
                 from ../src/client/openvpn3-service-client.cpp:60:

../openvpn3-core/openvpn/common/unicode-impl.hpp: In function ‘openvpn::Unicode::ConversionResult openvpn::Unicode::ConvertUTF8toUTF16(const UTF8**, const UTF8*, UTF16**, UTF16*, ConversionFlags)’:
../openvpn3-core/openvpn/common/unicode-impl.hpp:596:47: error: array subscript 6 is above array bounds of ‘const openvpn::Unicode::UTF32 [6]’ {aka ‘const unsigned int [6]’} [-Werror=array-bounds=]

  596 |         ch -= offsetsFromUTF8[extraBytesToRead];
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

../openvpn3-core/openvpn/common/unicode-impl.hpp:171:17: note: while referencing ‘openvpn::Unicode::offsetsFromUTF8’
171 | const UTF32 offsetsFromUTF8[6] = { 0x00000000UL,
0x00003080UL, 0x000E2080UL,

      |                 ^~~~~~~~~~~~~~~

cc1plus: all warnings being treated as errors
[92/246] c++ -Isrc/netcfg/openvpn3-service-netcfg.p -Isrc/ne [too-long-redacted] -c ../src/netcfg/netcfg-dco.cpp
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j2 -v returned exit code 1
make: *** [debian/rules:10: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

Signature · 9 lines
g. Marc

GPG: 827C FD74 BA46 8152 A041 F3A0 7A6A 4F17 5995 A65B


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
#2 lore raw
Quoted 8 lines · Marc Leeman

---------- Forwarded message ---------
From: Santiago Vila <[email protected]>
Date: Wed, 5 Aug 2026 at 13:25
Subject: Bug#1143682: openvpn3-client: FTBFS:
../openvpn3-core/openvpn/common/unicode-impl.hpp:596:47: error: array subscript 6 is above array bounds of 'const openvpn::Unicode::UTF32 [6]' {aka 'const unsigned int [6]'} [-Werror=array-bounds=]
To: Debian BTS <[email protected]>

Interesting. We worked around this in ConvertUTF8toUTF16 in v27.1, but apparently didn't encounter it in ConvertUTF32toUTF8.

Thanks,

Signature · 7 lines
  Frank Lichtenheld


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
#3 lore raw

I had another look at the issue and as it turns out, the unicode-impl.hpp needed replacing due to a license problem when uploading it to debian.

This is the comment I added when first uploading it to Debian:

```
 When scanning the sources, the version used with unicode-impl.hpp has
 a copyright header that is problematic with DFSG. There are more recent
 versions of this file that have an updated copyright that are compliant
 with DFSG. The upstream source has been adjusted by removing that file
 and this patch inserts an updated copy. See debian/README.source
```

and debian/README.source

```
During initial packaging, lintian picked up on a copy/not change licence
in unicode-impl.hpp.

The sources indicate that the code was fetched from  a web archive
location (ConvertUTF.h).

https://web.archive.org/web/20041122041550/http://www.unicode.org/Public/PROGRAMS/CVTUTF/

Searching further references, llvm has aa more recent copy that seems
to include an updated copyright file that allows it to be in main:

https://llvm.org/doxygen/ConvertUTF_8h_source.html

The implementation that was in the upstream release has been replaced by
the more recent copy from llvm (and adjusted to inline in a header file).

The original version has been removed in the DFSG source archive.
```

As such, the bug is on my side (the adjusted copy of unicode-impl.hpp). I have added boundary checks.

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel