| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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 "#"
|
|
|
|
|
|
|
|
| |
Don't call free_addrselectpolicy(&policyhead) before policyhead has been
initialized.
Reported by: Coverity
CID: 1018727
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Remove trailing whitespace and use `nitems(mib)` instead of `2` when
calling sysctl(3)
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
SJIS encoding don't have single byte characters >= 224
|
| |
|
|
|
|
| |
PR: 206927
|
|
|
|
|
|
|
|
|
|
|
|
| |
mbtowc(3): set errno to EILSEQ if an incomplete character is passed.
According to POSIX, The mbtowc() function shall fail if:
[EILSEQ] An invalid character sequence is detected.
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D5496
Obtained from: OpenBSD (Ingo Schwarze)
|
|
|
|
|
|
|
|
| |
rpc: fix failure to clear string by passing the wrong size to memset.
Noted by NetBSD's PR/21014
Obtained from: NetBSD (CVS Rev. 1.24, 1.25)
|
|
|
|
| |
Fix the gcc build after r295407.
|
|
|
|
|
|
|
|
|
| |
r268620:
Make generation of nslexer.c more robust.
r294876:
nslexer.c does not depend on nsparser.h.
r294877:
Replace nslexer.l->nslexer.c custom rule with a -D CFLAG.
|
|
|
|
| |
Make libc __pthread_map_stacks_exec() interposed.
|
|
|
|
|
|
|
|
|
| |
r295924: Make sure that hash-based db files fsync befor closing/syncing.
r295925: We no longer need O_SYNC pwd_mkd
r295465: We no longer need O_SYNC on services_mkdb
r295800: We no longer need O_SYNC on cap_mkdb
This should improve the performance of building db files.
|
|
|
|
|
|
| |
Add a standards compliance note for strtok_r
Approved by: re (marius@)
|
|
|
|
|
|
| |
Fix readpassphrase(3) when it's called with stdin being closed.
Approved by: re (delphij)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the implementations of PSEUDO_NOERROR and PSEUDO.
The PSEUDO* macros should not declare <syscall>, only _<syscall> and
__sys_<syscall>. This was causing the interposing C wrappers to be
ignored due to link order.
Reviewed by: kib
Obtained from: CheriBSD (4e8e13c90fc6a80e1520de44a6864cfd78b3b56d)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D4097
|
|
|
|
|
|
|
|
|
|
|
| |
fails.
This bug could be reproduced easily by calling sem_open() with O_CREAT |
O_EXCL on a semaphore that is already open in the process. The struct
sem_nameinfo would be freed while still in sem_list and later calls to
sem_open() or sem_close() could access freed memory.
PR: 206396
|
|
|
|
| |
sctp_sendx() needs to provide the assoc_id back.
|
|
|
|
| |
sctp_sendv() needs to fill in the association id on return.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tdelete(3): don't delete the node we are about to return.
The original change, from NetBSD, was bogus; introduced a memory
leak and and broke POSIX. By reverting we actually match NetBSD's
latest revision.
This is a direct commit to 10 since this function was rewritten
in 11-current.
Reported by: Markiyan Kushnir
Obtained from: NetBSD (CVS rev. 1.7, 1.8)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid reading pass the end of the source buffer when it is not NUL
terminated.
If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.
PR: 206178
Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid reading pass the end of the source buffer when it is not NUL
terminated.
If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.
PR: 206177
Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
|
|
|
|
|
|
|
|
|
|
|
|
| |
`gen_ether_subr`.
__MAKE_SHELL is only defined when installworld is run on stable/10,
which breaks workflows dealing with source trees mounted with noexec [*]
This is a direct commit to stable/10
Reported by: Mark Martinec <Mark.Martinec+freebsd@ijs.si>
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
|
| |
Fix a mismerge from NetBSD in r162194 with `xdr_rpcb_entry_list_ptr(..)`
This fixes the potential NULL pointer dereference properly, and also fixes
memory leaks encountered in the process of iterating through `*rp`.
Found by: Valgrind
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
|
|
|
|
|
|
|
|
|
| |
Similar to r293704, fix theoretical leak of netconfig(3) resources in
__rpcbind_is_up(..) if getnetconfig(3) is partly successful in allocating
resources, but not completely successful by moving the endnetconfig(3) call
up before we return from the function if nconf == NULL.
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix theoretical leak of netconfig(3) resources in svcunix_create(..)
In the event that the getconfig(3) call in svcunix_create is partly successful,
some of the netconfig(3) resources allocated might be leaked if the call returns
NULL as endnetconfig(3) wasn't called explicitly in that case. Ensure that the
resources are fully cleaned up by going to the `done` label, which will call
endnetconfig(3) for us.
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
|
|
|
|
|
|
|
|
|
| |
Zero out a local variable also when PURIFY is not defined.
This silence a warning brought up by valgrind whenever if_nametoindex
is used. This was already discussed in PR 166483, but the code
committed in r234329 guards the initilization with #ifdef PURIFY.
Therefore, valgrind still complains. Since this code is not performance
critical, always zero out the local variable to silence valgrind.
|
|
|
|
|
|
|
|
|
| |
Update the __FreeBSD_version check in lib/libc/sys/futimens.c and
lib/libc/sys/utimensat.c. Before this, fallback code using
futimes/futimesat/lutimes was used except when running on a sufficiently
recent 11-current kernel.
Also, update the history section in the man page.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel part of reroot support - a way to change rootfs without reboot.
Note that the mountlist manipulations are somewhat fragile, and not very
pretty. The reason for this is to avoid changing vfs_mountroot(), which
is (obviously) rather mission-critical, but not very well documented,
and thus hard to test properly. It might be possible to rework it to use
its own simple root mount mechanism instead of vfs_mountroot().
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2698
|
|
|
|
|
|
|
| |
Remove reboot.S (part of libc). It's not needed and was actually
broken - returning 0 from reboot(2) resulted in SIGBUS.
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
Add futimens and utimensat system calls.
|
|
|
|
|
|
|
|
| |
Move fdopen() up near other resource allocation like malloc(); do proper
deallocation on failure later on in the function.
Approved by: jhb
Sponsored by: Panasas, Inc.
|