Dimitry Andric
91b95f3d9a
Merge ^/head r311132 through r311305.
2017-01-04 20:41:43 +00:00
Dimitry Andric
629e066c03
Update lldb Makefile, and disable some functionality for Windows and
...
Darwin.
2017-01-04 19:53:04 +00:00
Xin LI
a94dccbe27
MFV r311279: zlib 1.2.10.
...
MFC after: 1 month
2017-01-04 16:09:08 +00:00
Enji Cooper
ccd0cf8ffa
snmp_mibII(3) requires net/if.h and net/if_mib.h
...
Document that requirement
MFC after: 1 week
2017-01-04 10:08:18 +00:00
Xin LI
ea3017ea00
Vendor import of zlib 1.2.10.
2017-01-04 09:37:45 +00:00
Xin LI
e16f0839c6
Restructure libz, place vendor files in contrib/zlib like other third
...
party software, this provides more standarized import workflow and
makes future upgrades easier.
The following files are new with this commit:
zconf.h.in
zlib.map
zlib.pc.in
They are not connected to build, but were kept in tree for reference
for future maintenance.
All our local trivial changes were applied to contrib/zlib, and the
contrib/zlib vendor source code is intended to 100% match lib/libz
before this commit.
MFC after: 2 weeks
2017-01-04 09:30:47 +00:00
Enji Cooper
d6766132c2
run: ensure pthread_condattr_{init,setclock} is successful
...
MFC after: 1 week
Reported by: Coverity
CID: 1268631, 1268633
2017-01-04 09:06:49 +00:00
Enji Cooper
dca7cc9815
setrlimit_basic: don't leak buf; free it on completion
...
MFC after: 3 days
Reported by: Coverity
CID: 978311
2017-01-04 09:00:16 +00:00
Enji Cooper
fcc9604d43
revoke_perm: don't leak fd at the end of the test; close it
...
This code is unused on FreeBSD, but it mutes a valid Coverity warning
which would be true on NetBSD
MFC after: 3 days
Reported by: Coverity
CID: 978311
2017-01-04 08:59:06 +00:00
Enji Cooper
621b0f13af
stat_symlink: don't leak fd; close the file descriptor when done
...
MFC after: 3 days
Reported by: Coverity
CID: 978314
2017-01-04 08:49:07 +00:00
Enji Cooper
c0b11b8e04
pipe_restart: free f on function exit to quell complaint from Coverity
...
MFC after: 3 days
Reported by: Coverity
CID: 978307
2017-01-04 08:43:27 +00:00
Enji Cooper
64af3fbaba
swapcontext1: test for getcontext(3) and swapcontext(3) success properly
...
The beforementioned libcalls both succeed if the return codes aren't -1
MFC after: 3 days
Reported by: Coverity
CID: 976790, 976791
2017-01-04 08:35:46 +00:00
Enji Cooper
7251167f52
Clarify lifetime of child(..) function
...
Ensure child exits when complete as it's always run in a forked
process.
Add a missing break statement in :pselect_sigmask when calling
child(..) for clarity and to avoid weird domino effects if the
child process somehow does something it's not supposed to do
with the logfiles, file descriptors, etc
MFC after: 1 week
Reported by: Coverity
CID: 1223369, 1223370, 1300301
2017-01-04 08:25:31 +00:00
Xin LI
0594943177
Add missing files in zlib 1.2.8.
2017-01-04 08:12:31 +00:00
Enji Cooper
17a0c1eb75
fpu: ensure calls to pthread_create succeed and test sched_yield to make
...
sure it returns 0
sched_yield tests for values returning 0 of type int and sched_yield is
of type long, so the test is a mismatch
MFC after: 1 week
Reported by: Coverity
CID: 1254953, 1254954, 1254965, 1254966
2017-01-04 08:07:48 +00:00
Enji Cooper
2e590d595e
Use calloc instead of malloc with buffers in snmp_{recv,send}_packet
...
This doesn't fix the issue noted in the PR, but at the very least it
cleans up the error so it looks a bit more sane, and in the event
that bsnmp did wander off into the weeds, the likelihood of it
crashing with more sensible output is greater, in my opinion
MFC counter set high so I have enough time to resolve the real
underlying bug in bsnmpwalk
MFC after: 1 month
PR: 215721
2017-01-04 07:53:01 +00:00
Enji Cooper
b5bbd2a17c
mincore_resid: free buf after use
...
MFC after: 3 days
Reported by: Coverity
CID: 978304
2017-01-04 04:55:33 +00:00
Enji Cooper
83e8b13f15
{strchr,strlen}_basic: don't leak the dlopen'ed handle; close after use
...
MFC after: 3 days
Reported by: Coverity
CID: 978299, 978300
2017-01-04 04:50:03 +00:00
Enji Cooper
5d37d9cc25
mknodat_fd: close dfd after use to avoid leaking it
...
MFC after: 3 days
Reported by: Coverity
CID: 978287
2017-01-04 04:32:00 +00:00
Enji Cooper
f4cbf11049
mkfifoat_fd: close dfd after use to avoid leaking it
...
MFC after: 3 days
Reported by: Coverity
CID: 978286
2017-01-04 04:29:53 +00:00
Enji Cooper
5641f109c1
fexecve: don't leak fd on fexecve(2) failure; close before calling err
...
MFC after: 3 days
Reported by: Coverity
CID: 978285
2017-01-04 04:27:13 +00:00
Enji Cooper
3b33767589
tty: don't leak s after opening it with openpty
...
MFC after: 3 days
Reported by: Coverity
CID: 978321
2017-01-04 04:19:05 +00:00
Enji Cooper
57f5b7d843
mmap_prot_3, mmap_truncate, mmap_truncate_signal: don't leak fd and map
...
Reported by: Coverity
CID: 978306, 1251406, 1288196, 1300541
2017-01-04 04:10:36 +00:00
Enji Cooper
619898777b
listen_low_port: check for errors from socket(2) before continuing
...
MFC after: 3 days
Reported by: Coverity
CID: 976778
2017-01-04 03:59:50 +00:00
Enji Cooper
2020383ffd
kqueue_desc_passing: initialize m.msg_flags to 0
...
This mutes an uninitialized scalar warning from Coverity
MFC after: 3 days
Reported by: Coverity
CID: 979620
2017-01-04 03:54:54 +00:00
Enji Cooper
ab25ecadbf
umask_open: don't leak fd on success
...
MFC after: 3 days
Reported by: Coverity
CID: 978315
2017-01-04 03:41:16 +00:00
Enji Cooper
3c917d6fa3
unlink_fifo: don't leak the file descriptors opened with mkfifo and open
...
MFC fater: 3 days
Reported by: Coverity
CID: 978316, 978317
2017-01-04 03:35:23 +00:00
Enji Cooper
6a64e31600
ttyname_err: close fd if it was opened successfully
...
MFC after: 3 days
Reported by: Coverity
CID: 978292
2017-01-04 02:52:39 +00:00
Enji Cooper
cc34906655
Fix Coverity issues
...
- Initialize .sun_len before passing it to strlcpy and bind.
- Close fd on error
MFC after: 3 days
Reported by: Coverity
CID: 978283, 979581
2017-01-04 02:46:36 +00:00
Enji Cooper
251d8e776e
humanize_number_basic: don't leak buf
...
MFC after: 3 days
Reported by: Coverity
CID: 1251407
2017-01-04 02:38:14 +00:00
Enji Cooper
06cd8428bc
ftok_link: don't leak fd
...
MFC after: 3 days
Reported by: Coverity
CID: 978291
2017-01-04 02:34:30 +00:00
Enji Cooper
05aee7d5b0
seekdir_basic: fix various Coverity issues
...
Address..
- .. resource leaks of file descriptors and memory
- .. unchecked return values from creat(2), mkdir(2), and telldir(3)
- .. potential NULL derefs after calling readdir(3)
MFC after: 1 week
Reported by: Coverity
CID: 975255, 975256, 976989, 978989, 978990
2017-01-04 02:31:05 +00:00
Enji Cooper
1a55af1fb9
Initialize msg.msg_flags to 0
...
This mutes a valid coverity warning about it being uninitialized
when passed in to sendmsg(2).
MFC after: 2 weeks
Reported by: Coverity
CID: 1368202
2017-01-04 01:38:07 +00:00
Dimitry Andric
ded09321a8
Disable PDB support in LLVMSymbolizer for now, to avoid llvm-objdump
...
pulling in all the PDB handling code.
2017-01-03 20:19:37 +00:00
Dimitry Andric
dfb5f2eb8a
Fix printf format warning on i386.
2017-01-03 18:10:23 +00:00
Dimitry Andric
e9f2ce8531
Comment out more unused functionality.
2017-01-03 18:09:54 +00:00
Dimitry Andric
545866cd2e
Remove incorrectly merged code fragment.
2017-01-03 18:09:16 +00:00
Dimitry Andric
5bf4713bde
Fix line endings (upstream file has CRLF ones).
2017-01-02 22:05:05 +00:00
Dimitry Andric
435933dd67
Update lldb to trunk r290819 and resolve conflicts.
2017-01-02 21:59:52 +00:00
Dimitry Andric
1189dbaa8c
Update lld to trunk r290819 and resolve conflicts.
2017-01-02 21:32:52 +00:00
Dimitry Andric
4429064704
Update clang to trunk r290819 and resolve conflicts.
2017-01-02 21:29:30 +00:00
Dimitry Andric
d88c1a5a57
Update llvm to trunk r290819 and resolve conflicts.
2017-01-02 21:25:48 +00:00
Enji Cooper
84d0b89e96
Fix spelling errors; bump .Dd for the change
...
MFC after: 3 days
2017-01-01 05:23:01 +00:00
Enji Cooper
d1b4c796ac
Bump .Dd for the spelling and .Nm updates
...
MFC after: 3 days
2017-01-01 05:16:24 +00:00
Enji Cooper
d075380571
Fix spelling errors
...
MFC after: 3 days
Reported by: igor
2017-01-01 05:14:58 +00:00
Enji Cooper
ad52f0d10c
bsnmpclient(3) also documents snmp_client_init, snmp_client_set_host,
...
and snmp_client_set_port. Add them to the NAME section
MFC after: 3 days
2017-01-01 05:13:54 +00:00
Enji Cooper
1cc49661ec
snmp_discover_engine: fix up req/resp (PDU object) handling a bit
...
- Call snmp_pdu_free on req and resp when done with the objects
- Call snmp_pdu_free on req before calling snmp_pdu_create on it
again
MFC after: 1 week
2016-12-31 23:20:57 +00:00
Enji Cooper
560c5ef9a2
Similar to r310954, set .len to 0 on malloc failure and to len
only
...
on success
MFC after: 1 week
2016-12-31 12:37:53 +00:00
Enji Cooper
39ebb4e1e0
Initialize ret to SNMPD_INPUT_OK at the top of snmp_input_start(..) to
...
avoid returning an uninitialized value
There are some really complicated, snakey if-statements combined with
switch statements that could result in an invalid value being returned
as `ret`
MFC after: 1 week
Reported by: Coverity
CID: 1006551
2016-12-31 12:30:14 +00:00
Enji Cooper
8e02b381d3
Use strlcpy when copying com
to pdu->community to avoid potential
...
buffer overruns
MFC after: 1 week
Reported by: Coverity
CID: 1006823, 1006824
2016-12-31 12:18:17 +00:00