[Bug 258701] tests: lib/libutil/pidfile_test flaky due to uninitialized array

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 24 Sep 2021 02:24:46 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258701

            Bug ID: 258701
           Summary: tests: lib/libutil/pidfile_test flaky due to
                    uninitialized array
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: tests
          Assignee: testing_at_FreeBSD.org
          Reporter: sigsys_at_gmail.com

Created attachment 228144
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=228144&action=edit
patch

The char array is used as a string after read(2)'ing directly into it without
terminating it. The following atoi() seems pretty tolerant of garbage bytes but
it can also get the wrong number or keep scanning past the array and crash if
you're unlucky. It was happening a lot for me for some reason.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Fri Sep 24 2021 - 02:24:46 UTC

Original text of this message