Project

General

Profile

Actions

Bug #14933

closed

asprintf(3c) is confused by NUL

Added by Marcel Telka 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

$ cat <<"EOF" > test.c
#include <stdio.h>

int
main(void)
{
        int i;
        char s[4];
        char *r;
        int ret;

        ret = sprintf(s, "a%ca", '\0');
        printf("%d", ret);
        for (i = 0; i < 4; i++)
                printf(" %02x", (unsigned char) s[i]);
        printf("\n");

        ret = asprintf(&r, "a%ca", '\0');
        printf("%d", ret);
        for (i = 0; i < 4; i++)
                printf(" %02x", (unsigned char) r[i]);
        printf("\n");

        return 0;
}
EOF
$ gcc -Wall -o test test.c
$ ./test
3 61 00 61 00
3 61 00 9f 08
$ ./test
3 61 00 61 00
3 61 00 45 08
$
Actions #1

Updated by Marcel Telka 4 months ago

  • Difficulty changed from Medium to Bite-size
Actions #2

Updated by Robert Mustacchi 3 months ago

Looking at the implementation this now makes sense. In particular, here's what we do when the size is less than the initial 128 byte buffer that we try to use:

        if (ret < INIT_SZ) {
                len = ret + 1;
                if ((newstr = malloc(len)) == NULL)
                        return (-1);    /* retain errno from malloc() */
                (void) strlcpy(newstr, string, len);
                *str = newstr;
                return (ret);
        }   

Note the use of strlcpy here. This isn't appropriate. We've been told the actual memory length of the string, which may have embedded NUL characters as Marcel's example does. Instead we should actually copy the entire length that we were returned and take into account the terminator. Because we use the ret < INIT_SZ check here, we know that it will have written a null terminator, so it should be safe to include in the copy.

Actions #3

Updated by Robert Mustacchi 3 months ago

  • Assignee set to Robert Mustacchi
Actions #4

Updated by Electric Monk 3 months ago

  • Gerrit CR set to 2329
Actions #5

Updated by Robert Mustacchi 3 months ago

I've tested this in a bunch of different ways. First here's what happened with Marcel's program:

rm@romulus ~ $ ./test 
3 61 00 61 00
3 61 00 61 00

This is what we want, which is good. I've added a test here, so it's good. In addition, I've been running and developing on systems with this and then spot-checked the various tests that used asprintf including (data to follow):

  • libc-tests (including 32-bit/64-bit asprintf-14933)
  • os-tests -- I diagnosed the failure as an issue of relying on /usr/share/dict/wrds, which is seemingly varying between systems and not a part of this.
rm@romulus ~ $ pfexec /opt/libc-tests/bin/libctest 
Test: /opt/libc-tests/tests/aligned_alloc.32 (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/aligned_alloc.64 (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/asprintf-14933.32 (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/asprintf-14933.64 (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/c11_threads.32 (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/c11_threads.64 (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/c11_tss.32 (run as root)              [00:00] [PASS]
Test: /opt/libc-tests/tests/c11_tss.64 (run as root)              [00:00] [PASS]
Test: /opt/libc-tests/tests/call_once.32 (run as root)            [00:00] [PASS]
Test: /opt/libc-tests/tests/call_once.64 (run as root)            [00:00] [PASS]
Test: /opt/libc-tests/tests/catopen (run as root)                 [00:00] [PASS]
Test: /opt/libc-tests/tests/endian.32 (run as root)               [00:00] [PASS]
Test: /opt/libc-tests/tests/endian.64 (run as root)               [00:00] [PASS]
Test: /opt/libc-tests/tests/env-7076.32 (run as root)             [00:00] [PASS]
Test: /opt/libc-tests/tests/env-7076.64 (run as root)             [00:00] [PASS]
Test: /opt/libc-tests/tests/fnmatch.32 (run as root)              [00:00] [PASS]
Test: /opt/libc-tests/tests/fnmatch.64 (run as root)              [00:00] [PASS]
Test: /opt/libc-tests/tests/fpround_test (run as root)            [00:00] [PASS]
Test: /opt/libc-tests/tests/i18n/bindtextdomain_test (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/memchr.32 (run as root)               [00:00] [PASS]
Test: /opt/libc-tests/tests/memchr.64 (run as root)               [00:00] [PASS]
Test: /opt/libc-tests/tests/memset_s.32 (run as root)             [00:00] [PASS]
Test: /opt/libc-tests/tests/memset_s.64 (run as root)             [00:00] [PASS]
Test: /opt/libc-tests/tests/newlocale_test (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/nl_langinfo_test (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/posix_memalign.32 (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/posix_memalign.64 (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/printf-6961.64 (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/printf-9511.32 (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/printf-9511.64 (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/priv_gettext (run as root)            [00:00] [PASS]
Test: /opt/libc-tests/tests/psignal (run as root)                 [00:00] [PASS]
Test: /opt/libc-tests/tests/pthread_attr_get_np (run as root)     [00:00] [PASS]
Test: /opt/libc-tests/tests/qsort/qsort_test (run as root)        [00:02] [PASS]
Test: /opt/libc-tests/tests/quick_exit (run as root)              [00:00] [PASS]
Test: /opt/libc-tests/tests/random/arc4key.ksh (run as root)      [00:01] [PASS]
Test: /opt/libc-tests/tests/random/arc4random (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/random/arc4random_fork (run as root)  [00:00] [PASS]
Test: /opt/libc-tests/tests/random/arc4random_forkall (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/random/arc4random_forksig (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/random/arc4random_prefork (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/random/arc4random_preforkall (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/random/arc4random_preforksig (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/random/chacha (run as root)           [00:00] [PASS]
Test: /opt/libc-tests/tests/random/getentropy (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/random/getrandom (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/random/inz_child (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/random/inz_inval (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/random/inz_mlock (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/random/inz_region (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/random/inz_split (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/random/inz_split_vpp (run as root)    [00:00] [PASS]
Test: /opt/libc-tests/tests/random/inz_vpp (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/regex/regex_test (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/select/select.sh (run as root)        [00:08] [PASS]
Test: /opt/libc-tests/tests/set_constraint_handler_s.32 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/set_constraint_handler_s.64 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/fileno.32 (run as root)         [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/fileno.64 (run as root)         [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/fmemopentest.32 (run as root)   [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/fmemopentest.64 (run as root)   [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/ftell_ungetc.32 (run as root)   [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/ftell_ungetc.64 (run as root)   [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/ftello_12768.64 (run as root)   [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/ftello_12768.lfs (run as root)  [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/memstream.32 (run as root)      [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/memstream.64 (run as root)      [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/memstream_reopen.32 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/memstream_reopen.64 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/open_memstreamtest.32 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/open_memstreamtest.64 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/orientation_test.32 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/orientation_test.64 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/test_mbrtowc.32 (run as root)   [00:00] [PASS]
Test: /opt/libc-tests/tests/stdio/test_mbrtowc.64 (run as root)   [00:00] [PASS]
Test: /opt/libc-tests/tests/strcoll-strxfrm-6907.32 (run as root) [00:01] [PASS]
Test: /opt/libc-tests/tests/strcoll-strxfrm-6907.64 (run as root) [00:00] [PASS]
Test: /opt/libc-tests/tests/strerror (run as root)                [00:00] [PASS]
Test: /opt/libc-tests/tests/thread_name (run as root)             [00:00] [PASS]
Test: /opt/libc-tests/tests/timespec_get.32 (run as root)         [00:00] [PASS]
Test: /opt/libc-tests/tests/timespec_get.64 (run as root)         [00:00] [PASS]
Test: /opt/libc-tests/tests/uchar.32 (run as root)                [00:00] [PASS]
Test: /opt/libc-tests/tests/uchar.64 (run as root)                [00:00] [PASS]
Test: /opt/libc-tests/tests/utimes.32 (run as root)               [00:00] [PASS]
Test: /opt/libc-tests/tests/utimes.64 (run as root)               [00:00] [PASS]
Test: /opt/libc-tests/tests/wcsncasecmp-7344.32 (run as root)     [00:00] [PASS]
Test: /opt/libc-tests/tests/wcsncasecmp-7344.64 (run as root)     [00:00] [PASS]
Test: /opt/libc-tests/tests/wcsncasecmp-7350.32 (run as root)     [00:00] [PASS]
Test: /opt/libc-tests/tests/wcsncasecmp-7350.64 (run as root)     [00:00] [PASS]
Test: /opt/libc-tests/tests/wcsncasecmp.32 (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/wcsncasecmp.64 (run as root)          [00:00] [PASS]
Test: /opt/libc-tests/tests/wcsrtombs_test (run as root)          [00:01] [PASS]
Test: /opt/libc-tests/tests/wctype_test (run as root)             [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/setup (run as root)           [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/assert_h (run as root)        [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/ctype_h (run as root)         [00:30] [PASS]
Test: /opt/libc-tests/tests/symbols/dirent_h (run as root)        [00:07] [PASS]
Test: /opt/libc-tests/tests/symbols/fcntl_h (run as root)         [00:19] [PASS]
Test: /opt/libc-tests/tests/symbols/locale_h (run as root)        [00:14] [PASS]
Test: /opt/libc-tests/tests/symbols/math_h (run as root)          [00:05] [PASS]
Test: /opt/libc-tests/tests/symbols/netdb_h (run as root)         [00:01] [PASS]
Test: /opt/libc-tests/tests/symbols/pthread_h (run as root)       [00:03] [PASS]
Test: /opt/libc-tests/tests/symbols/signal_h (run as root)        [00:02] [PASS]
Test: /opt/libc-tests/tests/symbols/stdalign_h (run as root)      [00:03] [PASS]
Test: /opt/libc-tests/tests/symbols/stddef_h (run as root)        [00:01] [PASS]
Test: /opt/libc-tests/tests/symbols/stdio_h (run as root)         [00:18] [PASS]
Test: /opt/libc-tests/tests/symbols/stdlib_h (run as root)        [00:17] [PASS]
Test: /opt/libc-tests/tests/symbols/stdnoreturn_h (run as root)   [00:01] [PASS]
Test: /opt/libc-tests/tests/symbols/string_h (run as root)        [00:03] [PASS]
Test: /opt/libc-tests/tests/symbols/strings_h (run as root)       [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/sys_atomic_h (run as root)    [02:00] [PASS]
Test: /opt/libc-tests/tests/symbols/sys_mman_h (run as root)      [00:35] [PASS]
Test: /opt/libc-tests/tests/symbols/sys_stat_h (run as root)      [00:09] [PASS]
Test: /opt/libc-tests/tests/symbols/sys_time_h (run as root)      [00:05] [PASS]
Test: /opt/libc-tests/tests/symbols/sys_timeb_h (run as root)     [00:00] [PASS]
Test: /opt/libc-tests/tests/symbols/time_h (run as root)          [00:01] [PASS]
Test: /opt/libc-tests/tests/symbols/threads_h (run as root)       [00:35] [PASS]
Test: /opt/libc-tests/tests/symbols/ucontext_h (run as root)      [00:04] [PASS]
Test: /opt/libc-tests/tests/symbols/unistd_h (run as root)        [00:26] [PASS]
Test: /opt/libc-tests/tests/symbols/wchar_h (run as root)         [00:13] [PASS]
Test: /opt/libc-tests/tests/symbols/wctype_h (run as root)        [00:33] [PASS]

Results Summary
PASS     121

Running Time:   00:07:19
Percent passed: 100.0%
rm@romulus ~ $ pfexec /opt/os-tests/bin/ostest 
Test: /opt/os-tests/tests/clock_gettime.32 (run as root)          [00:00] [PASS]
Test: /opt/os-tests/tests/clock_gettime.64 (run as root)          [00:00] [PASS]
Test: /opt/os-tests/tests/definit/definit (run as root)           [00:00] [PASS]
Test: /opt/os-tests/tests/eventfd.32 (run as root)                [00:00] [PASS]
Test: /opt/os-tests/tests/eventfd.64 (run as root)                [00:00] [PASS]
Test: /opt/os-tests/tests/imc_test (run as root)                  [00:00] [PASS]
Test: /opt/os-tests/tests/odirectory.32 (run as root)             [00:00] [PASS]
Test: /opt/os-tests/tests/odirectory.64 (run as root)             [00:00] [PASS]
Test: /opt/os-tests/tests/writev.32 (run as root)                 [00:00] [PASS]
Test: /opt/os-tests/tests/writev.64 (run as root)                 [00:00] [PASS]
Test: /opt/os-tests/tests/zen_umc_test (run as root)              [00:00] [PASS]
Test: /opt/os-tests/tests/cores/core_prereqs (run as root)        [00:00] [PASS]
Test: /opt/os-tests/tests/cores/coretests (run as root)           [00:04] [PASS]
Test: /opt/os-tests/tests/ddi_ufm/ufm-test-setup (run as root)    [00:00] [PASS]
Test: /opt/os-tests/tests/ddi_ufm/ufm-test (run as root)          [00:00] [PASS]
Test: /opt/os-tests/tests/ddi_ufm/ufm-test-cleanup (run as root)  [00:00] [PASS]
Test: /opt/os-tests/tests/file-locking/runtests.32 (run as root)  [00:21] [PASS]
Test: /opt/os-tests/tests/file-locking/runtests.64 (run as root)  [00:21] [PASS]
Test: /opt/os-tests/tests/i386/ldt (run as root)                  [00:06] [PASS]
Test: /opt/os-tests/tests/i386/badseg (run as root)               [00:07] [PASS]
Test: /opt/os-tests/tests/ksensor/ksensor_init (run as root)      [00:00] [PASS]
Test: /opt/os-tests/tests/ksensor/ksensor_basic.32 (run as root)  [00:00] [PASS]
Test: /opt/os-tests/tests/ksensor/ksensor_basic.64 (run as root)  [00:00] [PASS]
Test: /opt/os-tests/tests/ksensor/ksensor_err.32 (run as root)    [00:00] [PASS]
Test: /opt/os-tests/tests/ksensor/ksensor_err.64 (run as root)    [00:00] [PASS]
Test: /opt/os-tests/tests/ksensor/ksensor_fini (run as root)      [00:00] [PASS]
Test: /opt/os-tests/tests/libtopo/digraph-test (run as root)      [00:00] [PASS]
Test: /opt/os-tests/tests/pf_key/acquire-compare (run as root)    [00:43] [PASS]
Test: /opt/os-tests/tests/pf_key/kmc-update (run as root)         [00:00] [PASS]
Test: /opt/os-tests/tests/portfs/file_assoc.32 (run as root)      [00:00] [PASS]
Test: /opt/os-tests/tests/portfs/file_assoc.64 (run as root)      [00:00] [PASS]
Test: /opt/os-tests/tests/sdevfs/sdevfs_eisdir (run as root)      [00:00] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_aslr (run as root)    [00:02] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_core (run as root)    [00:01] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_dts (run as root)     [00:11] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_elfdump (run as root) [00:01] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_forbidnullmap (run as root) [00:00] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_limits (run as root)  [00:00] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_noexecstack (run as root) [00:00] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_proc (run as root)    [00:01] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_psecflags (run as root) [00:11] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_syscall (run as root) [00:00] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_truss (run as root)   [00:00] [PASS]
Test: /opt/os-tests/tests/secflags/secflags_zonecfg (run as root) [00:00] [PASS]
Test: /opt/os-tests/tests/sigqueue/sigqueue_queue_size (run as root) [00:00] [PASS]
Test: /opt/os-tests/tests/sockfs/conn (run as root)               [00:05] [PASS]
Test: /opt/os-tests/tests/sockfs/dgram (run as root)              [00:05] [PASS]
Test: /opt/os-tests/tests/sockfs/drop_priv (run as root)          [00:07] [PASS]
Test: /opt/os-tests/tests/sockfs/nosignal (run as root)           [00:02] [PASS]
Test: /opt/os-tests/tests/sockfs/rights.32 (run as root)          [00:00] [PASS]
Test: /opt/os-tests/tests/sockfs/rights.64 (run as root)          [00:00] [PASS]
Test: /opt/os-tests/tests/sockfs/sockpair (run as root)           [00:10] [PASS]
Test: /opt/os-tests/tests/sockfs/recvmsg.32 (run as root)         [00:00] [PASS]
Test: /opt/os-tests/tests/sockfs/recvmsg.64 (run as root)         [00:00] [PASS]
Test: /opt/os-tests/tests/stackalign/stackalign.32 (run as root)  [00:00] [PASS]
Test: /opt/os-tests/tests/stackalign/stackalign.64 (run as root)  [00:00] [PASS]
Test: /opt/os-tests/tests/stress/dladm-kstat (run as root)        [00:20] [PASS]
Test: /opt/os-tests/tests/syscall/fchmodat.32 (run as root)       [00:00] [PASS]
Test: /opt/os-tests/tests/syscall/fchmodat.64 (run as root)       [00:00] [PASS]
Test: /opt/os-tests/tests/syscall/open.32 (run as root)           [00:00] [PASS]
Test: /opt/os-tests/tests/syscall/open.64 (run as root)           [00:00] [PASS]
Test: /opt/os-tests/tests/timer/timer_limit (run as root)         [00:00] [PASS]
Test: /opt/os-tests/tests/uccid/atrparse (run as root)            [00:00] [PASS]

Results Summary
PASS      63

Running Time:   00:03:04
Percent passed: 100.0%
rm@romulus ~ $ pfexec /opt/util-tests/bin/utiltest 
Test: /opt/util-tests/tests/allowed-ips (run as root)             [00:01] [PASS]
Test: /opt/util-tests/tests/ar/artest (run as root)               [00:01] [PASS]
Test: /opt/util-tests/tests/chown_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/date_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/find/findtest (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/grep_test (run as root)               [00:02] [PASS]
Test: /opt/util-tests/tests/head/head_test (run as root)          [00:00] [PASS]
Test: /opt/util-tests/tests/libjedec_test (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/libsff/libsff (run as root)           [00:00] [PASS]
Test: /opt/util-tests/tests/make_test (run as root)               [00:00] [PASS]
Test: /opt/util-tests/tests/mdb/mdbtest (run as root)             [00:02] [PASS]
Test: /opt/util-tests/tests/mergeq/mqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/mergeq/wqt (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/pcidbtest (run as root)               [00:02] [PASS]
Test: /opt/util-tests/tests/pcieadm-priv (run as root)            [00:02] [PASS]
Test: /opt/util-tests/tests/pcieadmtest (run as root)             [00:04] [PASS]
Test: /opt/util-tests/tests/printf_test (run as root)             [00:00] [PASS]
Test: /opt/util-tests/tests/set-linkprop (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/show-overlay-exit (run as root)       [00:01] [PASS]
Test: /opt/util-tests/tests/sleep/sleeptest (run as root)         [00:19] [PASS]
Test: /opt/util-tests/tests/smbios (run as root)                  [00:00] [PASS]
Test: /opt/util-tests/tests/svr4pkg_test (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/xargs_test (run as root)              [00:00] [PASS]
Test: /opt/util-tests/tests/awk/runtests.sh (run as nobody)       [02:53] [PASS]
Test: /opt/util-tests/tests/ctf/precheck (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/ctf/ctftest (run as root)             [00:06] [PASS]
Test: /opt/util-tests/tests/demangle/afl-fast (run as root)       [00:01] [PASS]
Test: /opt/util-tests/tests/demangle/gcc-libstdc++ (run as root)  [00:00] [PASS]
Test: /opt/util-tests/tests/demangle/llvm-stdcxxabi (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_remove (run as root)   [00:00] [PASS]
Test: /opt/util-tests/tests/libcustr/custr_trunc (run as root)    [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_00_blank (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_01_boolean (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_02_numbers (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_03_empty_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_04_number_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_05_strings (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_06_nested (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/libnvpair_json/json_07_nested_arrays (run as root) [00:00] [PASS]
Test: /opt/util-tests/tests/sed/sed_addr (run as root)            [00:00] [PASS]
Test: /opt/util-tests/tests/sed/multi_test (run as root)          [00:00] [FAIL]

Results Summary
PASS      40
FAIL       1
Actions #6

Updated by Electric Monk 3 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 4322dd9069f078f823a09309fbdfc08ed9085b8d

commit  4322dd9069f078f823a09309fbdfc08ed9085b8d
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2022-09-06T00:14:41.000Z

    14933 asprintf(3c) is confused by NUL
    Reviewed by: Dan McDonald <danmcd@mnx.io>
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Actions

Also available in: Atom PDF