Age | Commit message (Collapse) | Author |
|
instead of 2400-ths of second. No behaviour change.
|
|
The function update_progress_meter() calls refresh_progress_meter()
which calls snmprintf() which calls malloc(); but update_progress_meter()
acts as the SIGALRM signal handler.
"malloc(): error: recursive call" reported by sobrado@.
|
|
of word mismatch as reported by jsg@.
Discussed with otto@ and others early on, earlier version tested in ports build
by aja@
OK millert@
Few readability tweaks and OK schwarze@
|
|
grow, or it would be overrun; issue found by tb@ with malloc.conf(5) 'C'.
While here, reserve an additional byte for the terminating NUL
up front such that we don't have to realloc() later just for that.
OK tb@
|
|
1. If vasprintf() returns < 0, do not access a NULL pointer in snmprintf(),
and do not free() the pointer returned from vasprintf() because on some
systems other than OpenBSD, it might be a bogus pointer.
2. If vasprintf() returns == 0, return 0 and "" rather than -1 and NULL.
Besides, free(dst) is pointless after failure (not a bug).
One half OK martijn@, the other half OK deraadt@;
committing quickly before people get hurt.
|
|
unless they have changed.
|
|
last character if it won't be used. This (and last few commits) prompted
by a report from Hubert depesz Lubaczewski.
|
|
is normally better because using cub1 will be ^H^H (so two bytes) but
cub would be ^[[2D (four).
|
|
not just the first one. Otherwise we end up storing the blanks.
Now the file generated by mklocale(1) is the same regardless of
whether or not the input is sent through the C preprocessor.
OK deraadt@ jca@ schwarze@
|
|
for an http proxy - we need tty in this case. Found and fixed by
Anthony Coulter <bsd@anthonycoulter.name>.
ok tb@
|
|
Noticed by and a modified version of fix from <attila@stalphonsos.com>
|
|
Diff supplied by Kai Antweiler.
OK semarie@ and deraadt@
|
|
|
|
one table, minus twenty lines of code, no loss of functionality.
No idea why i didn't do this earlier...
|
|
full audio block.
|
|
|
|
called conditionally later).
|
|
|
|
|
|
between input and output block sizes. This was inherited from sndiod,
but is not required for files because they are continuous streams of
samples and do not need to be split in blocks of equal duration.
This change makes playback/recording rate match exactly the requested
sample rate.
|
|
play buffer if there's less than one block of data left. This is the
correct condition in the general case. No behaviour change, as all
input/output is multiple of the block size.
|
|
|
|
provide routines to calculate them. This way we don't rely on it
to calculate the bytes procuded/consumed anymore. No behaviour change.
|
|
tls_* function; so actually do that.
|
|
Found the hard way by jca@
|
|
|
|
|
|
doesn't necessarily work if there is an entry with an empty name.
|
|
consumed from both input and output buffers. No behaviour change.
|
|
terminal, for ASCII and UTF-8, escape bytes not forming characters
and bytes forming non-printable characters with vis(3) VIS_OCTAL.
For other character sets, abort printing of the current string in
these cases. In particular,
* let scp(1) respect the local user's LC_CTYPE locale(1);
* sanitize data received from the remote host;
* sanitize filenames, usernames, and similar data even locally;
* take character display widths into account for the progressmeter.
This is believed to be sufficient to keep the local terminal safe
on OpenBSD, but bad things can still happen on other systems with
state-dependent locales because many places in the code print
unencoded ASCII characters into the output stream.
Using feedback from djm@ and martijn@,
various aspects discussed with many others.
deraadt@ says it should go in now, i probably already hesitated too long
|
|
Diff from Vladimir Sotirov via tech@. Thanks!
ok millert@
|
|
happen when remote devices are used and is not an error.
|
|
|
|
right before we call poll().
|
|
audioctl and alike.
|
|
|
|
|
|
|
|
tell if the buffer is too small, and an expanding buffer is overkill
anyway.
|
|
|
|
|
|
Using feedback about bugs in earlier versions from Matthew Martin
<phy1729 at gmail dot com> and from tsg@ who tested it with afl(1).
OK czarkoff@ tsg@
|
|
|
|
kdump can't do that for a sigaction sa_handler pointer from the trace,
so cast to void* to suppress it.
ok deraadt@
|
|
|
|
Alternative diff by Tim (trondd ! kagu-tsuchi . com), ok tedu@
|
|
|
|
way pledge introduced by millert@ in -r1.70 is now a two way pledge, one
for non-root and one for root. This also ensures that root drops the
id promise in all cases early on.
This disentangling of the bits for root and non-root simplifies the code
paths in all cases.
ok millert@
|
|
to reduce the noise in the next commit. While there, fix the indent
level of a bit introduced in the previous commit.
ok millert@
|
|
promise when run as root since we don't need proc or exec as
root. OK tb@, earlier version OK deraadt@
|