Adapt to null byte behavior change in Qt6

In Qt5 the terminating \0 character is not considered part of the
byte array, but this behavior was removed in Qt6, so the library needs
to handle the behavior change by itself.

See also:
6 jobs for !15 with work/fuf/qt6-fix in 2 minutes and 12 seconds (queued for 3 seconds)
latest merge request