| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Don't use fixup for C99 and up, the compiler result is already correct.
Suggested by: bde
|
|
|
|
|
| |
Reflect error indication according to POSIX and what those functions
currently do.
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Unifdef USE_WEAK_SEEDING since it is too obsolete to support and makes
reading hard.
2) Instead of doing range transformation in each and every function here,
do it single time directly in do_rand(). One "mod" operation overhead is not
a big deal, but the code looks nicer and possible future functions additions
or PRNG change do not miss range transformations neither have unneeded ones.
3) Use POSIX argument types for visible functions (cosmetic).
|
|
|
|
|
| |
can't be merged without conflicts and require merging of other versions
too and I don't want to go deep in that unmerged commits chain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Unifdef USE_WEAK_SEEDING it is too obsolete to support and makes reading
harder.
2) ACM paper require seed to be in [1, 2^31-2] range, so use the same range
shifting as already done for rand(3). Also protect srandomdev() + TYPE_0 case
(non default) from negative seeds.
3) Don't check for valid "type" range in setstate(), it is always valid as
calculated. Instead add a check that rear pointer not exceeed end pointer.
MFC: r300965
Micro optimize: C standard guarantees that right shift for unsigned value
fills left bits with zero, and we have exact 32bit unsigned value
(uint32_t), so there is no reason to add "& 0x7fffffff" here.
|
|
|
|
| |
FTS: Remove stale reference to nfs4 fs which was removed in r192578.
|
|
|
|
|
|
|
| |
the character after the one this conversion stopped at.
PR: 209907
Submitted by: Roel Standaert <roel@abittechnical.com> (partially)
|
|
|
|
|
|
|
| |
Call closedir() before returning from fetchListFile() to avoid a leak.
Reported by: Coverity
CID: 1016697
|
|
|
|
|
|
|
| |
Don't leak addrinfo in fetch_bind()
Submitted by: Coverity
CID: 1225038
|
|
|
|
|
|
|
|
|
| |
Fix Coverity CID 978183 Resource leak in rexec().
Close the socket if connect() fails to avoid leaking it.
Reported by: Coverity
CID: 978183
|
|
|
|
|
|
|
|
|
| |
Fix Coverity CID 1016714 Resource leak in process_file_actions_entry()
Don't leak a file descriptor of _dup2() fails (shouldn't happen).
Reported by: Coverity
CID: 1016714
|
|
|
|
|
|
|
|
|
| |
Fix 1016718 Resource leak.
Don't leak a file descriptor if fchdir() fails.
Reported by: Coverity
CID: 1016718
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make both the loader and kernel use the interface-mtu option if the
dhcp server provides it. Made up of these (semi-)related changes...
[kernel...] If the dhcp server provides an interface-mtu option, parse
the value and set that mtu on the interface.
[libstand...]
Garbage collect the bswap routines from libstand, use sys/endian.h.
If the dhcp server delivers an interface-mtu option, parse it and store
the value in a new global intf_mtu for use by the application.
[loader...]
If the dhcp server provided an interface-mtu option, transcribe the value
to the boot.netif.mtu env var, which will be picked up by pre-existing code
in nfs_mountroot() and used to configure the interface accordingly.
PR: 187094
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libc/regex: fix two buffer underruns.
Fix some rather complex regex issues found on OpenBSD as part of some
ongoing work to fix a sed(1) bug.
Curiously the OpenBSD tests don't trigger segfaults on FreeBSD but the
bugs were confirmed by running a port of FreeBSD's regex under OpenBSD's
malloc. Huge thanks to Ingo for confirming the behavior.
Obtained from: OpenBSD (CVS 1.20, 1.21)
|
|
|
|
| |
application code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) POSIX prohibits printing errors to stderr here and require
returning NULL:
"Upon successful completion, initstate() and setstate() shall return a
pointer to the previous state array; otherwise, a null pointer shall
be returned.
Although some implementations of random() have written messages to
standard error, such implementations do not conform to POSIX.1-2008."
2) Move error detections earlier to prevent state modifying.
|
|
|
|
| |
file 5.27.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------------------------------------------------------------------
r300327 | ken | 2016-05-20 13:30:52 -0600 (Fri, 20 May 2016) | 11 lines
Add the density code for LTO-7 to libmt and the mt(1) man page.
The density code and bits per mm values were obtained from an
actual drive density report.
The number of tracks were obtained from an LTO-7 hardware
announcement on IBM's web site.
------------------------------------------------------------------------
Sponsored by: Spectra Logic
|
|
|
|
|
|
|
|
|
|
| |
Set retval in the empty password case to avoid a path through the
code that fails to set retval before falling through to the final
return().
Reported by: emaste
Reported by: Coverity
CID: 1018711
|
|
|
|
|
|
|
|
|
| |
Read the contents of the snapshot files properly
- Use fgetln instead of fgets; localize complexity related to fgetln(3)
inside the loop.
- Skip over blank lines.
- Skip over lines (properly) that start with a "#"
|
|
|
|
|
|
|
|
|
|
| |
Hoist the getpwnam() call outside the first if/else block in
pam_sm_chauthtok(). Set user = getlogin() inside the true
branch so that it is initialized for the following PAM_LOG()
call. This is how it is done in pam_sm_authenticate().
Reported by: Coverity
CID: 272498
|
|
|
|
|
|
|
|
| |
Don't call free_addrselectpolicy(&policyhead) before policyhead has been
initialized.
Reported by: Coverity
CID: 1018727
|
|
|
|
|
|
|
| |
The requirement is for a GCC-compatible compiler and not necessarily
GCC itself. However, we currently expect any compiler used for building
the whole of FreeBSD to be GCC-compatible and many things will break if
not; there's no longer a need to have an explicit test for this in csu.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r299879 | truckman | 2016-05-15 18:30:32 -0700 (Sun, 15 May 2016) | 7 lines
Likely a false positive ... but make sure that -1 can't be used as an
array index by splitting up a test.
r299880 | truckman | 2016-05-15 18:38:24 -0700 (Sun, 15 May 2016) | 8 lines
Since rdata is only used as an argument to the immediately following
call to res_nopt_rdata(), revert r299879 and fix CID 603941 by moving
rdata = &buf[n];
inside the if block.
Reported by: Coverity
CID: 603941
|
|
|
|
|
|
|
|
|
| |
Use strlcpy() instead of strncpy() to ensure that qf->fsname is NUL
terminated. Don't bother checking for truncation since the subsequent
stat() call should detect that and fail.
Reported by: Coverity
CID: 1018189
|
|
|
|
| |
Build libpam modules in parallel.
|
|
|
|
|
|
|
| |
Add EVFILT_VNODE open, read and close notifications.
MFC r298984:
Correct wording.
|
|
|
|
|
|
| |
Issue NOTE_EXTEND when a directory entry is added to or removed from
the monitored directory as the result of rename(2) operation. The
renames staying in the directory are not reported.
|
|
|
|
|
|
|
|
|
| |
Fix memory allocation edgecases in kvm_argv(..)
- Don't leak nbufp on realloc failure in kvm_argv
- Catch malloc errors with bufp
- Set buflen last in the "buflen == 0" case to ensure that
bufp/nbufp is properly reallocated on the next go around
|
|
|
|
|
|
| |
Don't leak PML4 in _amd64_initvtop(..) if kvm_read2(..) fails
CID: 1341474
|
|
|
|
|
|
|
| |
Do not leak THR_FLAGS_SUSPENDED from the previous suspend/resume
cycle.
PR: 209233
|
|
|
|
|
|
|
|
| |
settle. file is now downgraded to 5.25.
PR: bin/209211
Requested by: Tomoaki AOKI
Relnotes: yes
|
|
|
|
| |
Explain NOTE_LINK reporting for the directories.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide an example to the kqueue man page, showing
a basic usage example. Although it is an
untypical example for the use of kqueue, it is
better than nothing and should get people started.
PR: 196844
Submitted by: fernando.apesteguia@gmail.com
Reviewed by: kib
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D6082
|
|
|
|
| |
Clean up trailing whitespace in lib/libcam; no functional change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix va_list handling
- Add missing va_end's after corresponding va_start's to cleanup state
- Eliminate questionable bzero'ing of va_list passed in to
do_buff_decode(..) and do_encode(..) from buff_{de,en}code_visit(..)
and csio_{de,en}code_visit(..). Make va_list a pointer instead and
pass NULL into the underlying functions to handler this in a portable
way.
- Do some minor style(9) clean up in affected functions.
CID: 1018500-1018503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r298311:
Make sure fmemopen succeeds in :test_append_binary_pos before calling ftell
on the FILE object
This fixes potential null pointer dereferences on failure
CID: 1254952
r298312:
Fix double fclose of `fp1` when freopen fails
freopen handles closing file descriptors on error, with the exception of
fdopen'ed descriptors, so closing an already fclose'd file descriptor is
incorrect
CID: 1338525
|
|
|
|
|
|
| |
Update file to 5.26.
Relnotes: yes
|
|
|
|
|
|
|
|
|
|
|
| |
regex: prevent two improbable signed integer overflows.
In matcher() we used an integer to index nsub of type size_t.
In print() we used an integer to index nstates of type sopno,
typedef'd long.
In both cases the indexes never take negative values.
Match the types to avoid any error.
|
|
|
|
| |
Fix markup on "\n" in printf so it renders correctly.
|
|
|
|
|
|
|
|
| |
Fix appending -O0 to CFLAGS
The previous method would completely nerf CFLAGS once bsd.progs.mk had
recursed into the per-PROG logic and make the CFLAGS for tap testcases
to -O0, instead of appending to CFLAGS for all of the tap testcases.
|
|
|
|
|
| |
Remove trailing whitespace and use `nitems(mib)` instead of `2` when
calling sysctl(3)
|
|
|
|
|
|
| |
libgssapi: avoid NULL pointer dereferences.
While here also use NULL instead of zero for pointers.
|
|
|
|
|
|
|
| |
Document KTRFAC_FAULT and KTRFAC_FAULTEND.
Obtained from: CheriBSD (9d70f563f1b033e6a9b51eaf3b145a8cbbc6617c)
Sponsored by: DARPA, AFRL
|
|
|
|
|
| |
Follow-up r295924: Only sync hash-based db files open for writing when
closing.
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
The namesz and descsz variables need to be used in native endianness.
The sizes are in native order after swapping in the file to memory case,
and before swapping in the memory to file case.
This change is not identical to r275430 because r273443 was never merged
to stable/10, and libelf moved from lib/ to contrib/elftoolchain/.
|
|
|
|
| |
Remove unused variable.
|
|
|
|
| |
SJIS encoding don't have single byte characters >= 224
|
| |
|