1. 18 Jun, 2018 6 commits
  2. 17 Jun, 2018 3 commits
    • Guillem Jover's avatar
      Remove dead code in vis · 5e0998fa
      Guillem Jover authored
      The loop only executes while len > 0, and the trinary operator in the
      function argument is checking against len >= 1 which will always be
      true.
      
      Warned-by: coverity
      5e0998fa
    • Guillem Jover's avatar
      Fix vis family of functions to not leak · 8e2d5504
      Guillem Jover authored
      The code uses an internal helper function to avoid code repetition. But
      to get there, the function takes a pointer to a pointer, so that the few
      functions that require returning an allocated buffer can get hold of it
      this way.
      
      The problem is that the user might pass a NULL pointer and trigger an
      internal allocation even if the functions are not expected to do so.
      
      Add a new internal helper for non-allocations, that will assert that
      condition, and make any other function that requires this behavior call
      this one instead.
      
      Warned-by: coverity
      8e2d5504
    • Baruch Siach's avatar
      flopen: Add missing <fcntl.h> include · 13c32916
      Baruch Siach authored
      Commit 993828d8 (Add flopenat() function from FreeBSD) dropped the
      fcntl.h header. This breaks the build with musl libc:
      
      flopen.c: In function ‘vflopenat’:
      flopen.c:60:14: error: ‘O_CREAT’ undeclared (first use in this function)
        if (flags & O_CREAT) {
                    ^~~~~~~
      
      Restore the fcntl.h header include to fix the build.
      
      Fixes: commit 993828d8Submitted-also-by: default avatarparazyd <parazyd@dyne.org>
      Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
      Signed-off-by: Guillem Jover's avatarGuillem Jover <guillem@hadrons.org>
      13c32916
  3. 22 May, 2018 1 commit
    • Guillem Jover's avatar
      Fix strnvis() and strnunvis() NetBSD ABI break · e4e15ed2
      Guillem Jover authored
      The NetBSD implementations have different prototypes to the ones coming
      from OpenBSD, which will break builds, and have caused segfaults at
      run-time. We provide now both interfaces with different prototypes as
      different version nodes allow selecting them at compile-time, defaulting
      for now to the OpenBSD one to avoid build-time breakage, while emitting
      a compile-time warning. Later on, in 0.10.0, we will be switching the
      compile-time default to the NetBSD version.
      
      Ref: http://gnats.netbsd.org/44977
      Fixes: https://bugs.debian.org/899282
      e4e15ed2
  4. 21 May, 2018 15 commits
  5. 04 Apr, 2018 1 commit
    • Baruch Siach's avatar
      Fix build for openrisc with uClibc · f6ed7c27
      Baruch Siach authored
      uClibc defines EM_OR1K instead of EM_OPENRISC for the OpenRISC ELF
      e_machine ID. Use EM_OR1K when EM_OPENRISC is not defined.
      
      This fixes the following build failure:
      
      In file included from nlist.c:44:0:
      nlist.c: In function ‘__elf_is_okay__’:
      local-elf.h:224:23: error: ‘EM_OPENRISC’ undeclared (first use in this function)
       #define ELF_TARG_MACH EM_OPENRISC
                             ^
      nlist.c:77:26: note: in expansion of macro ‘ELF_TARG_MACH’
         if (ehdr->e_machine == ELF_TARG_MACH &&
                                ^
      Signed-off-by: Guillem Jover's avatarGuillem Jover <guillem@hadrons.org>
      f6ed7c27
  6. 06 Mar, 2018 1 commit
  7. 04 Mar, 2018 2 commits
  8. 16 Jul, 2017 1 commit
    • Guillem Jover's avatar
      Fix handling of non-contiguous argv + envp in setproctitle() · 2a8514d8
      Guillem Jover authored
      The two arrays might not reference contiguous memory, and assuming they
      are does break at least now on GNU/Hurd, which contains an unmapped
      memory block between the memory used by the two arrays.
      
      Just check that each element is strictly after the previous one, so that
      we know there are no unmapped memory blocks inbetween.
      2a8514d8
  9. 24 Jun, 2017 2 commits
  10. 19 Jun, 2017 4 commits
  11. 05 Jun, 2017 3 commits
  12. 16 Jan, 2017 1 commit