| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This is the same issue as r297997, but was missed in it.
The WARNS value changes between 'build-tools' (MK_WARNS=no) and
'everything' resulting in a rebuild of this file.
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix in r300649 was not sufficient to convince Coverity that the
buffer was NUL terminated, even with the buffer pre-zeroed. Swap
the size and nmemb arguments to fread() so that a valid lenght is
returned, which we can use to terminate the string in the buffer
at the correct location. This should also quiet the complaint about
the return value of fread() not being checked.
Reported by: Coverity
CID: 1019054, 1009614
MFC after: 1 week
|
|
|
|
|
| |
The format limits descriptions to 18 characters and is not changed, so
the descriptions do not describe the limits exactly.
|
|
|
|
|
|
|
|
|
| |
The first file in these lists will generate everything else so only
it should be getting a .meta file. With bmake's missing=yes meta
feature these would otherwise cause a rebuild without the
.NOMETA hint.
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
| |
ki_flag and ki_tdflag have been 'long', not 'int', since 2000 and 2005,
respectively.
Submitted by: Shawn Wills <swills at isilon dot com>
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
| |
case of \c in the prompt format string is a no-op. We already passed
this test at the top of the loop, and i has not yet been incremented in
this path. Change this test to (i < PROMPTLEN - 2).
Reported by: Coverity
CID: 1008328
Reviewed by: cem
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
This will make things more flexible if the program path changes in the future,
and the test in and of itself doesn't call /usr/bin/bc -- it just calls bc
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
| |
if read_stream() or write_stream() fails to avoid leaking the FILE.
Reported by: Coverity
CID: 977702
Reviewed by: pfg
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6554
|
|
|
|
|
|
|
|
|
| |
Increase the size of buf[] by one to allow room for a NUL character
at the end.
Reported by: Coverity
CID: 1019054
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no need to to call strdup() on the value returned by fmt().
The latter calls fmt_argv() which always returns a dynamically
allocated string, and calling strdup() on that leaks the memory
allocated by fmt_argv(). Wave some const magic on ki_args and
ki_env to make the direct assignment happy. This requires a tweak
to the asprintf() case to avoid a const vs. non-const mismatch.
Reported by: Coverity
CID: 1011370
MFC after: 1 week
|
|
|
|
|
|
| |
Reported by: Coverity
CID: 1007203
MFC after: 1 week
|
|
|
|
|
|
|
| |
They were swapped.
X-Confirmed by: jilles
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the magic constant 127 in the loop interation count with
"PROMPTLEN - 1".
gethostname() is not guaranteed to NUL terminate the destination
string if it is too short. Decrease the length passed to gethostname()
by one, and add a NUL at the end of the buffer to make sure the
following loop to find the end of the name properly terminates.
The default: case is the likely cause of Coverity CID 1008328. If
i is 126 at the top of the loop interation where the default case
is triggered, i will be incremented to 127 by the default case,
then incremented to 128 at the top of the loop before being compared
to 127 (PROMPTLENT - 1) and terminating the loop. Then the NUL
termination code after the loop will write to ps[128]. Fix by
checking for overflow before incrementing the index and storing the
second character in the buffer.
These fixes are not guaranteed to satisfy Coverity. The code that
increments i in the 'h'/'H' and 'w'/'W' cases may be beyond its
capability to analyze, but the code appears to be safe.
Reported by: Coverity
CID: 1008328
Reviewed by: jilles, cem
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6482
|
|
|
|
| |
Suggested by: ed
|
|
|
|
|
|
|
|
|
| |
- Use arc4random_uniform(3).
- Prevent a segmentation fault when ed receives a signal
while being in getpass(). [1]
Obtained from: OpenBSD [1] (CVS Rev. 1.15)
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard
Obtained from: NetBSD
|
|
|
|
|
|
| |
This avoids running target binaries.
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
namespacing is kept with FILES appropriately, and that this shouldn't need
to be repeated if the namespace changes -- only the definition of PACKAGE
needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
`tests`. In the event we get to the point where things can be split up
enough in the base system, it would make more sense to group the tests
with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.
MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
|
| |
If the hostname is empty and \h is used in $PS1,
the remainder of the prompt following \h will be empty.
Likewise for $PWD and \w. Fix it.
Reviewed by: jilles
MFC after: 1 week
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D6188
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a related typo while here.
Note, this change results in the Kyuafile inclusion in the runtime
package, which needs to be fixed, however addresses the PR as far
as I can tell in my tests.
PR: 209114
Submitted by: ngie
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
This is related to r270256 but was missed in that occasion.
MFC after: 3 days
|
|
|
|
|
|
|
| |
is invalid. It is used to find the size of allocated memory. As malloc may
allocate memory with mmap it will fail to take this memory into account.
Obtained from: brooks
|
|
|
|
|
|
| |
kvm_open(3) will return NULL when it cannot access kernel virtual memory.
MFC after: 2 weeks.
|
|
|
|
| |
MFC after: 2 weeks.
|
| |
|
|\
| |
| |
| | |
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build. Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.
Sponsored by: EMC / Isilon Storage Division
|
| | |
|
| |
| |
| |
| | |
Found with devel/coccinelle.
|
| |
| |
| |
| | |
Sponsored by: The FreeBSD Foundation
|
|\ \
| |/
| |
| | |
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| |
| |
| | |
Found with devel/coccinelle.
Reviewed by: jilles
|
| |
| |
| |
| |
| | |
The builtins/getopts1.0 test failed if a single-character file existed in
the current directory.
|
| |
| |
| |
| |
| |
| |
| |
| | |
fixes usage with system libraries which maintain their own signal state.
PR: 208132
Obtained from: kib
MFC after: 3 days
|
|\ \
| |/
| |
| | |
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| | |
MFC after: 1 week
|
| |
| |
| |
| |
| | |
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| |
| |
| |
| | |
At least for ncurses this fixes a build error due to it trying to run
'ccache --version' to work around a gcc 5 bug using the fix in r287205.
Sponsored by: EMC / Isilon Storage Division
|
|\ \
| |/
| |
| | |
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| |
| |
| |
| | |
This just copied uninitialized data and did not depend on it later, so it
should not be dangerous.
Found by: clang static analyzer
|
| |
| |
| |
| |
| |
| |
| |
| | |
login.conf(5) support.
Reviewed by: jilles
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D5610
|
|\ \
| |/
| |
| | |
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| | |
Sponsored by: EMC / Isilon Storage Division
|
| |
| |
| |
| |
| | |
The option does not do anything so check that the output of 'set +o' is
different.
|
| |
| |
| |
| | |
Reported by: hrs
|
|\ \
| |/
| |
| | |
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| | |
Found by: clang static analyzer
|
|\ \
| |/
| |
| | |
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
libraries (such as libthr) which maintain their own signal state. This
change adds the tcsh SAVESIGVEC option to save and restore the sigvecs for
the signals the child modifies before it execs.
Reviewed by: kib, rwatson
Reported by: kib
|