openbsd
10 years agoKNF.
jsing [Thu, 22 May 2014 14:41:24 +0000 (14:41 +0000)]
KNF.

10 years agoNuke pointless dev_bsize variable which is always set to 512, and just
krw [Thu, 22 May 2014 14:38:48 +0000 (14:38 +0000)]
Nuke pointless dev_bsize variable which is always set to 512, and just
use DEV_BSIZE.

Replace lseek+read with pread().

10 years agoupdate nosuidcoredump example. mentioned by stefan wollny
tedu [Thu, 22 May 2014 14:11:41 +0000 (14:11 +0000)]
update nosuidcoredump example. mentioned by stefan wollny

10 years agoNuke pointless dev_bsize variable which is always set to 512, and just
krw [Thu, 22 May 2014 14:04:41 +0000 (14:04 +0000)]
Nuke pointless dev_bsize variable which is always set to 512, and just
use DEV_BSIZE.

Write sizes need to be secsize and not DEV_BSIZE, just like reads.

Equivalent to changes made in fsck_ffs.

10 years agoMore KNF.
jsing [Thu, 22 May 2014 11:48:49 +0000 (11:48 +0000)]
More KNF.

10 years agoMake this build cleanly even with UTF8_{putc,getc} moved from the
guenther [Thu, 22 May 2014 03:36:23 +0000 (03:36 +0000)]
Make this build cleanly even with UTF8_{putc,getc} moved from the
public header to the internal.  Make some variables unsigned to
eliminate some warnings

10 years agoNo uses of UTF8_{getc,putc}() in ports, so remove them from the public header.
guenther [Thu, 22 May 2014 03:34:26 +0000 (03:34 +0000)]
No uses of UTF8_{getc,putc}() in ports, so remove them from the public header.

ok miod@

10 years agoNuke some trailing whitespace to shrink subsequent diffs.
krw [Thu, 22 May 2014 02:15:54 +0000 (02:15 +0000)]
Nuke some trailing whitespace to shrink subsequent diffs.

10 years agoFrom FreeBSD: the second argument to UFS_UPDATE/ffs_update is just a
guenther [Thu, 22 May 2014 02:02:39 +0000 (02:02 +0000)]
From FreeBSD: the second argument to UFS_UPDATE/ffs_update is just a
boolean, not a MNT_* flag.

ok beck@

10 years agoWe only have one possible location to use for a logged in port, so only set
jmatthew [Wed, 21 May 2014 23:01:43 +0000 (23:01 +0000)]
We only have one possible location to use for a logged in port, so only set
it in one place.

10 years agoWhen the firmware tells us a loop id is already in use, add the device
jmatthew [Wed, 21 May 2014 22:59:26 +0000 (22:59 +0000)]
When the firmware tells us a loop id is already in use, add the device
there to our port lists, then find the next available loop id and carry on
rather than restarting.  This way, we're less likely to get stuck looping
when the firmware behaves inconsistently.  We also don't need to treat domain
controller logins specially.

10 years agoNuke some trailing whitespace to shrink subsequent diffs.
krw [Wed, 21 May 2014 18:53:05 +0000 (18:53 +0000)]
Nuke some trailing whitespace to shrink subsequent diffs.

10 years agostat(2) on the spool file needs privileges. Fixes file size reported by
pascal [Wed, 21 May 2014 18:38:42 +0000 (18:38 +0000)]
stat(2) on the spool file needs privileges.  Fixes file size reported by
lpq -l.

ok millert@

10 years agoNuke some trailing whitespace to shrink subsequent diffs.
krw [Wed, 21 May 2014 17:52:26 +0000 (17:52 +0000)]
Nuke some trailing whitespace to shrink subsequent diffs.

10 years agoNuke some trailing whitespace and break some long lines to shrink
krw [Wed, 21 May 2014 17:38:30 +0000 (17:38 +0000)]
Nuke some trailing whitespace and break some long lines to shrink
subsequent diffs.

10 years agoNuke some trailing whitespace to shrink subsequent diffs.
krw [Wed, 21 May 2014 16:32:08 +0000 (16:32 +0000)]
Nuke some trailing whitespace to shrink subsequent diffs.

10 years agoFix 'fdisk -u', a.k.a. MBR_pcopy(), on sparc64 and possibly others.
krw [Wed, 21 May 2014 15:55:19 +0000 (15:55 +0000)]
Fix 'fdisk -u', a.k.a. MBR_pcopy(), on sparc64 and possibly others.

gcc's built-in/in-lined memcpy() can't copy elements of a struct
dos_partiton array from inside the __packed struct dos_mbr into an
'unpacked' local variable. But copying the whole array works fine. Be
consistant and use the same idiom in both places the partition table
is parsed.

Leave the landisk workaround/hack in place until it can be confirmed
it is no longer needed.

ok martynas@ after many alternatives crashed and burned.

10 years agofix MALLOC_STATS (not compiled in by default); ok tedu@
otto [Wed, 21 May 2014 15:47:51 +0000 (15:47 +0000)]
fix MALLOC_STATS (not compiled in by default); ok tedu@

10 years agoFix IPsec route addition broken since the removal of the link-layer
mpi [Wed, 21 May 2014 14:48:28 +0000 (14:48 +0000)]
Fix IPsec route addition broken since the removal of the link-layer
addresses from the per-ifp list.

While here document why enc(4) needs a link-layer address, or at
least something that seems to be one.

Found the hard way and fix tested by naddy@, ok mikeb@, henning@

10 years agoregen
mpi [Wed, 21 May 2014 13:04:47 +0000 (13:04 +0000)]
regen

10 years agoAdd VIA Labs.
mpi [Wed, 21 May 2014 13:04:23 +0000 (13:04 +0000)]
Add VIA Labs.

10 years agoHandle the stall condition just like the bable one since in both cases
mpi [Wed, 21 May 2014 12:31:53 +0000 (12:31 +0000)]
Handle the stall condition just like the bable one since in both cases
the ring is halted.

Do not bother reporting USBD_STALLED to the stack like other HC drivers
do since the endpoint is automatically reseted.  What is the point of
this error apart from making sure driver authors will forget to call
usbd_clear_endpoint_stall_async() correctly?

The Renesas uPD720202 xHCI, provided by Stefan Wollny, now works as
expected.

10 years agowhen failing because of unexpected output, show the offending output
djm [Wed, 21 May 2014 07:04:21 +0000 (07:04 +0000)]
when failing because of unexpected output, show the offending output

10 years agoUse errc/warnc to simplify code.
guenther [Wed, 21 May 2014 06:23:01 +0000 (06:23 +0000)]
Use errc/warnc to simplify code.

ok jca@ krw@

10 years agodocument which keywords are posix conformant;
jmc [Wed, 21 May 2014 06:01:19 +0000 (06:01 +0000)]
document which keywords are posix conformant;
ok guenther sobrado

10 years agoExit with non-zero status if a read is truncated, or if a compression
guenther [Wed, 21 May 2014 04:17:56 +0000 (04:17 +0000)]
Exit with non-zero status if a read is truncated, or if a compression
program was used but it didn't exit successfully.

Original diff by mpf@

10 years agoChange use of Z_PARTIAL_FLUSH to Z_SYNC_FLUSH in the hibernate code as per
mlarkin [Wed, 21 May 2014 02:26:49 +0000 (02:26 +0000)]
Change use of Z_PARTIAL_FLUSH to Z_SYNC_FLUSH in the hibernate code as per
a warning/comment in zlib.h that Z_PARTIAL_FLUSH "will be removed, use
Z_SYNC_FLUSH instead".

10 years agoTypo in comment noticed during some recent hibernate debugging. No code
mlarkin [Wed, 21 May 2014 02:20:18 +0000 (02:20 +0000)]
Typo in comment noticed during some recent hibernate debugging. No code
change.

10 years agoFix invalid / missing format specifiers in several dnprintf statements
mlarkin [Wed, 21 May 2014 02:14:07 +0000 (02:14 +0000)]
Fix invalid / missing format specifiers in several dnprintf statements
(used only when ACPI_DEBUG is enabled)

From a diff on tech@ by Fabian Raetz, with a minor change by me, tested
on i386 and amd64 with ACPI_DEBUG enabled and disabled.

10 years agowarn about implicit. misspelled function names in libc are deadly.
tedu [Wed, 21 May 2014 01:17:52 +0000 (01:17 +0000)]
warn about implicit. misspelled function names in libc are deadly.

10 years agodestinct is spelled distinct.
dlg [Tue, 20 May 2014 23:41:36 +0000 (23:41 +0000)]
destinct is spelled distinct.

ok henning@ jmc@

10 years agoremove irrelevant, outdated, and misleading sentence suggesting that
halex [Tue, 20 May 2014 22:49:43 +0000 (22:49 +0000)]
remove irrelevant, outdated, and misleading sentence suggesting that
you need to set up a local mirror for the install sets

brought to attention by pascal@ ok krw@

10 years agoMerge the fixes from the upstream. Factor out some common code in
yasuoka [Tue, 20 May 2014 22:28:07 +0000 (22:28 +0000)]
Merge the fixes from the upstream.  Factor out some common code in
tty.c and fix EL_SETTY to work.

ok nicm

10 years agoAs suggested by guenther@ and millert@, replace seek+[read|write] with
krw [Tue, 20 May 2014 21:11:16 +0000 (21:11 +0000)]
As suggested by guenther@ and millert@, replace seek+[read|write] with
p[read|write].  Makes the code much clearer by eliminating extra error
checking and verbiage.

No intentional functional change.

Tweaks by and ok guenther@

10 years agoformat string cleanup: change "%i" to "%d" and fix a few typos
eric [Tue, 20 May 2014 18:47:01 +0000 (18:47 +0000)]
format string cleanup: change "%i" to "%d" and fix a few typos

10 years agoUnify the SSL privsep key loading functions.
reyk [Tue, 20 May 2014 17:33:36 +0000 (17:33 +0000)]
Unify the SSL privsep key loading functions.

ok eric@

10 years agoKSSL is dead... nuke KSSL_DEBUG from orbit.
jsing [Tue, 20 May 2014 16:59:05 +0000 (16:59 +0000)]
KSSL is dead... nuke KSSL_DEBUG from orbit.

ok beck@ miod@

10 years agoregen
mpi [Tue, 20 May 2014 15:02:54 +0000 (15:02 +0000)]
regen

10 years agoAdd VIA VL80x xHCI.
mpi [Tue, 20 May 2014 15:02:24 +0000 (15:02 +0000)]
Add VIA VL80x xHCI.

10 years agoFormat string fixes for XHCI_DEBUG.
mpi [Tue, 20 May 2014 14:46:19 +0000 (14:46 +0000)]
Format string fixes for XHCI_DEBUG.

10 years agoDeep down inside OpenSSL, err... LibreSSL, RSA_set_ex_data attempts to
reyk [Tue, 20 May 2014 14:21:45 +0000 (14:21 +0000)]
Deep down inside OpenSSL, err... LibreSSL, RSA_set_ex_data attempts to
free() the external data when releasing the RSA object.  The
RSA_GET_EX_NEW_INDEX(3) manual page doesn't mention that this is the
default behaviour - it just describes the possible free_func()
callback - and the code path in libcrypto is hiding the fact behind
layers of abstraction.

Fix possible double free by allocating and copying the external data
reference that is used for RSA privsep (pkiname in smtpd's case).

ok eric@ gilles@

10 years agoAdd -o max_read=XXX support in fuse. This is needed by usmb to have a
syl [Tue, 20 May 2014 13:32:22 +0000 (13:32 +0000)]
Add -o max_read=XXX support in fuse. This is needed by usmb to have a
working read() and write().

ok tedu@

10 years agoAdd support for -o XXX or -oXXX options in libfuse.
syl [Tue, 20 May 2014 13:22:06 +0000 (13:22 +0000)]
Add support for -o XXX or -oXXX options in libfuse.

inputs from tedu@, ok tedu@

10 years agoThe argv[] used for el_set() EL_BIND, EL_SETTY, etc should be terminated
nicm [Tue, 20 May 2014 11:59:03 +0000 (11:59 +0000)]
The argv[] used for el_set() EL_BIND, EL_SETTY, etc should be terminated
by NULL. Fix from NetBSD via yasuoka@ but changed by me not to walk off
the end of array with >20 arguments.

ok yasuoka

10 years agoAssign the queue ID to the correct packet header when sending ICMP messages.
mpi [Tue, 20 May 2014 11:03:13 +0000 (11:03 +0000)]
Assign the queue ID to the correct packet header when sending ICMP messages.

ok henning@

10 years agoFix eui64 address generation, broken since the removal of the link-layer
mpi [Tue, 20 May 2014 10:29:01 +0000 (10:29 +0000)]
Fix eui64 address generation, broken since the removal of the link-layer
address from the per-ifp list.

Found the hard way by weerd@, florian@ and stsp@, ok florian@

10 years agocorrectly match size and buffer. from enh at google
mpi [Tue, 20 May 2014 09:16:43 +0000 (09:16 +0000)]
correctly match size and buffer. from enh at google

10 years agoremove dead files
eric [Tue, 20 May 2014 08:09:04 +0000 (08:09 +0000)]
remove dead files

10 years agoyet more code that no longer makes any sense
espie [Tue, 20 May 2014 05:55:43 +0000 (05:55 +0000)]
yet more code that no longer makes any sense

10 years agomakewhatis being now external, it no longer requires picky/test/check_dir.
espie [Tue, 20 May 2014 05:46:13 +0000 (05:46 +0000)]
makewhatis being now external, it no longer requires picky/test/check_dir.
It also can't handle too many manpages at once (shell limit) so hand-feed
it (problem spotted by landry@).

Some tests by schwarze@.

10 years agofix bogus extension: $code and $code2 belong in _system, so that
espie [Tue, 20 May 2014 05:43:55 +0000 (05:43 +0000)]
fix bogus extension: $code and $code2 belong in _system, so that
both system and verbose_system will work properly.

10 years agoUse errc/warnc to simplify code.
guenther [Tue, 20 May 2014 01:25:23 +0000 (01:25 +0000)]
Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr.

ok jsing@ krw@ millert@

10 years agoBring UTF8_{getc,putc} up-to-date: it's been a decade since 5- and 6-byte
guenther [Tue, 20 May 2014 01:21:52 +0000 (01:21 +0000)]
Bring UTF8_{getc,putc} up-to-date: it's been a decade since 5- and 6-byte
encodings and encoding of surrogate pair code points were banned.  Add
checks for those, both to those functions and to the code decoding the
BMP and UNIV encodings.

ok miod@

10 years agoFormat string fixes and removal of -Wno-format for sgi. Based upon an
miod [Mon, 19 May 2014 21:18:42 +0000 (21:18 +0000)]
Format string fixes and removal of -Wno-format for sgi. Based upon an
initial diff from jasper@

10 years agoX509_free() the certificate if the server hostname check fails.
jca [Mon, 19 May 2014 20:09:22 +0000 (20:09 +0000)]
X509_free() the certificate if the server hostname check fails.
No functional change.  Reported by Mike Small and Maxime Villard.

10 years agoFix several bounds checks in ssl_add_clienthello_tlsext() and
miod [Mon, 19 May 2014 20:09:15 +0000 (20:09 +0000)]
Fix several bounds checks in ssl_add_clienthello_tlsext() and
ssl_add_serverhello_tlsext(), and convert all of them to the same idiom, for
easier review.

Math is hard, let's go webshopping.

Help and ok guenther@

10 years agoExplicitely initialize two static variables introduced in the previous
jca [Mon, 19 May 2014 20:05:09 +0000 (20:05 +0000)]
Explicitely initialize two static variables introduced in the previous
commit, to please lteo@

10 years agoHTTPS connections may see redirects, so initialize libcrypto and libssl
jca [Mon, 19 May 2014 20:03:16 +0000 (20:03 +0000)]
HTTPS connections may see redirects, so initialize libcrypto and libssl
only once, and reuse the crafted SSL_CTX for further connections.
ok lteo@

10 years agoPlug a small memory leak: if we pass checkin_init/checkin_update
jca [Mon, 19 May 2014 19:42:24 +0000 (19:42 +0000)]
Plug a small memory leak: if we pass checkin_init/checkin_update
a revision thru pb.newrev, it will not be freed.  From Fritjof
Bornebusch, no objections from tech@

10 years agono more -K;
jmc [Mon, 19 May 2014 17:07:16 +0000 (17:07 +0000)]
no more -K;

10 years agokerberos leftovers
tedu [Mon, 19 May 2014 15:05:13 +0000 (15:05 +0000)]
kerberos leftovers

10 years agoconsistent use of uint32_t for poison values
tedu [Mon, 19 May 2014 14:30:03 +0000 (14:30 +0000)]
consistent use of uint32_t for poison values

10 years agoAdd some consistency in fuse error handling. We need to return ENXIO
syl [Mon, 19 May 2014 13:55:29 +0000 (13:55 +0000)]
Add some consistency in fuse error handling. We need to return ENXIO
when the fuse communication channel is broken and ENOSYS when the
libfuse callback does not exist.

Reported by Helg Bredow, thanks!
ok tedu@

10 years agoas reported by Helg, should use realpath for mounts. ok guenther syl
tedu [Mon, 19 May 2014 13:43:30 +0000 (13:43 +0000)]
as reported by Helg, should use realpath for mounts. ok guenther syl

10 years agoThere is no need to remember which usb(4) device is the child of an USB
mpi [Mon, 19 May 2014 13:11:31 +0000 (13:11 +0000)]
There is no need to remember which usb(4) device is the child of an USB
host controller because autoconf(9) already does it.

Breakage reported by todd@

10 years agosync
todd [Mon, 19 May 2014 12:40:53 +0000 (12:40 +0000)]
sync

10 years agoMore KNF.
jsing [Mon, 19 May 2014 12:34:53 +0000 (12:34 +0000)]
More KNF.

10 years agoMore whack-a-mole^Wfips.
jsing [Mon, 19 May 2014 12:18:23 +0000 (12:18 +0000)]
More whack-a-mole^Wfips.

ok miod@

10 years agoIt is perfectly valid to call free(NULL), so stop checking for non-NULL
jsing [Mon, 19 May 2014 12:13:30 +0000 (12:13 +0000)]
It is perfectly valid to call free(NULL), so stop checking for non-NULL
before calling free - of some course parts of the code already did this.

10 years agoNuke some trailing whitespace that snuck in.
krw [Mon, 19 May 2014 10:42:08 +0000 (10:42 +0000)]
Nuke some trailing whitespace that snuck in.

10 years agoNo point in trying to update the -L file on loss of link if no -L has
krw [Mon, 19 May 2014 10:37:40 +0000 (10:37 +0000)]
No point in trying to update the -L file on loss of link if no -L has
been specified. Eliminates spurious "Couldn't write ''" log messages.

Spotted while looking into Roman Gorelov's logs on another problem.

10 years agoAdd a H_SAVE_FP operation to history() which lets the history be saved
nicm [Mon, 19 May 2014 08:58:34 +0000 (08:58 +0000)]
Add a H_SAVE_FP operation to history() which lets the history be saved
to an open file pointer. From NetBSD via Eitan Adler.

ok millert

10 years agofix format mistakes visible if AUDIO_DEBUG is defined
ratchov [Mon, 19 May 2014 07:00:15 +0000 (07:00 +0000)]
fix format mistakes visible if AUDIO_DEBUG is defined

10 years agounbreak the build when DIAGNOSTIC is not defined
jsg [Mon, 19 May 2014 06:54:34 +0000 (06:54 +0000)]
unbreak the build when DIAGNOSTIC is not defined
allows ramdisk kernels to build again

10 years agoUpdate run(4) firmware to version 0.33, with permission from Dennis Lee
stsp [Mon, 19 May 2014 05:38:51 +0000 (05:38 +0000)]
Update run(4) firmware to version 0.33, with permission from Dennis Lee
of Mediatek to keep using the free firmware licence we've been using.
Tested by myself, rapha@, Fred Crowson, Dinar Talypov, gerhard@, matthieu@.

10 years agoEnable the 3- and 4-byte sequence tests for UTF8_getc()
guenther [Mon, 19 May 2014 02:05:10 +0000 (02:05 +0000)]
Enable the 3- and 4-byte sequence tests for UTF8_getc()
Add surrogate and out-of-range tests for UTF8_putc() on the assumption
we'll make it return -2.  Maybe.

10 years agoAdd regression test for UTF8_{getc,putc}()
guenther [Sun, 18 May 2014 22:04:14 +0000 (22:04 +0000)]
Add regression test for UTF8_{getc,putc}()

10 years agohid_start_parse can't fail - it calls malloc(M_WAITOK). ok mpi@
jca [Sun, 18 May 2014 21:43:11 +0000 (21:43 +0000)]
hid_start_parse can't fail - it calls malloc(M_WAITOK).  ok mpi@

10 years agoCorrectly handle files smaller than an ELF header; reported by drahn@bitrig
miod [Sun, 18 May 2014 21:18:07 +0000 (21:18 +0000)]
Correctly handle files smaller than an ELF header; reported by drahn@bitrig

10 years ago_PIC is an optional method, so we shouldn't be aborting the rest of the
mlarkin [Sun, 18 May 2014 20:16:29 +0000 (20:16 +0000)]
_PIC is an optional method, so we shouldn't be aborting the rest of the
MADT processing if it is missing. This, combined with an earlier diff
from kettenis@ to fix MADT interrupt polarity processing, should resolve
the issues reported with QEMU/KVM ACPI power button presses when using
OpenBSD guests.

ok kettenis@, pirofti@
tested by myself and kettenis for the past few weeks

10 years agoIf you need to allocate `a + b' bytes of memory, then don't allocate `a + b*2',
miod [Sun, 18 May 2014 19:35:04 +0000 (19:35 +0000)]
If you need to allocate `a + b' bytes of memory, then don't allocate `a + b*2',
this is confusing and unnecessary.

Help (coz I got confused) and ok guenther@ beck@

10 years agoMake sure UTF8_getc() is invoked with the proper buffer size.
miod [Sun, 18 May 2014 19:30:36 +0000 (19:30 +0000)]
Make sure UTF8_getc() is invoked with the proper buffer size.

ok beck@ guenther@

10 years agouse reallocarray
espie [Sun, 18 May 2014 17:50:11 +0000 (17:50 +0000)]
use reallocarray
okay ian@, chl@

10 years agofactor out a bit of the chunk index code and use it to make sure that a
tedu [Sun, 18 May 2014 17:49:47 +0000 (17:49 +0000)]
factor out a bit of the chunk index code and use it to make sure that a
freed chunk is actually freeable immediately. catch more errors.
hints/ok otto

10 years agoDo not pass an xfer pointer to the timeout routine checking for root hub
mpi [Sun, 18 May 2014 17:10:27 +0000 (17:10 +0000)]
Do not pass an xfer pointer to the timeout routine checking for root hub
status changes because it might be freed when detaching the root uhub(4).

Also do not reschedule a timeout if the pipe is being aborted.

Finally do not add more code to retrieve the 'bInterval' value of the
root hub endpoint descriptor since this value is hardcoded in the uhci(4)
driver.

10 years agoOut of all the openssl apps, just one of them has code to mess around with
jsing [Sun, 18 May 2014 16:43:18 +0000 (16:43 +0000)]
Out of all the openssl apps, just one of them has code to mess around with
electric fence externs. Nuke from orbit.

ok miod@

10 years agouse reallocarray
espie [Sun, 18 May 2014 16:36:41 +0000 (16:36 +0000)]
use reallocarray
okay miod@, millert@

10 years agoW_OK comes via unistd.h - nuke several #ifndef W_OK that attempt to handle
jsing [Sun, 18 May 2014 16:34:04 +0000 (16:34 +0000)]
W_OK comes via unistd.h - nuke several #ifndef W_OK that attempt to handle
missing defines.

10 years agoRemove unused include.
jsing [Sun, 18 May 2014 16:26:02 +0000 (16:26 +0000)]
Remove unused include.

10 years agoGroup and sort includes.
jsing [Sun, 18 May 2014 16:21:03 +0000 (16:21 +0000)]
Group and sort includes.

Currently "apps.h" needs to be included before any of the openssl headers
and there are several cases where the code depends on headers that are
included by something included by apps.h...

More untangling saved for later on.

10 years agoPlug memory leaks upon error in OCSP_url_svcloc_new().
miod [Sun, 18 May 2014 16:19:09 +0000 (16:19 +0000)]
Plug memory leaks upon error in OCSP_url_svcloc_new().

ok jsing@

10 years agoIn OCSP_sendreq_bio(), cope with OCSP_sendreq_new() returning NULL.
miod [Sun, 18 May 2014 16:18:13 +0000 (16:18 +0000)]
In OCSP_sendreq_bio(), cope with OCSP_sendreq_new() returning NULL.

ok jsing@

10 years agoIn dtls1_reassemble_fragment() and dtls1_process_out_of_seq_message(), in case
miod [Sun, 18 May 2014 16:13:48 +0000 (16:13 +0000)]
In dtls1_reassemble_fragment() and dtls1_process_out_of_seq_message(), in case
of error, make sure we do not free pitem which is still linked into the
pqueue.
In the same vain, only free `frag' if we allocated it in this function.

Help and ok beck@

10 years agoIn ssl3_send_certificate_request(), when adding the extra payload if
miod [Sun, 18 May 2014 16:10:26 +0000 (16:10 +0000)]
In ssl3_send_certificate_request(), when adding the extra payload if
NETSCAPE_HANG_BUG is defined, make sure we BUF_MEM_grow() the buffer to
accomodate for the payload size.

Issue reported by David Ramos; ok beck@

10 years agoMake sure ssl3_setup_buffers() does not return upon error with a freed
miod [Sun, 18 May 2014 16:08:37 +0000 (16:08 +0000)]
Make sure ssl3_setup_buffers() does not return upon error with a freed
pqueue still chained, by inserting it into the list only after all possible
failure conditions have been avoided.

Reported and fix proposed by David Ramos; ok beck@

10 years agoFix tail packet check in elantech v3 touchpad code. Due to a typo this
stsp [Sun, 18 May 2014 15:27:28 +0000 (15:27 +0000)]
Fix tail packet check in elantech v3 touchpad code. Due to a typo this
code was masking out bits which were also tested in the same expression.
Reported by cppcheck via jsg@ (Expression '(X & 0xfc) != 0x2' is always true).
Tested with Elantech Touchpad, version 3, firmware 0x250f00.

10 years agoDon't add a lease to the leases TAILQ more than once. It tends to
krw [Sun, 18 May 2014 15:17:50 +0000 (15:17 +0000)]
Don't add a lease to the leases TAILQ more than once. It tends to
make writing out the leases file go into an infinite loop until
/var is full.

Reported by Roman Gorelov via bugs@

Fix tested & ok stsp@ uwe@

10 years agosync
todd [Sun, 18 May 2014 14:06:23 +0000 (14:06 +0000)]
sync

10 years agobio_err is initialised in main, hence there is no need to initialise it
jsing [Sun, 18 May 2014 11:36:24 +0000 (11:36 +0000)]
bio_err is initialised in main, hence there is no need to initialise it
in each application (since there is no longer a non-monolithic mode).

In typical OpenSSL fashion, the code is inconsistent and there are multiple
ways that bio_err was initialised - none of them actually checked to see if
the initialisation actually succeeded. Additionally, it is worth noting
that in at least two cases bio_err was also being used before it would have
been initialised.

ok miod@

10 years agoMore KNF.
jsing [Sun, 18 May 2014 11:28:41 +0000 (11:28 +0000)]
More KNF.