Andre Noll [Wed, 17 May 2023 20:13:55 +0000 (22:13 +0200)]
audiod: Fix error checking in init_default_filters().
We ignore the return value of add_filter() instead of assigning it to
ret as usual, then test ret anyway. That's clearly bogus, even more
so since with the old code ret can never be negative at this point, so
the subsequent condition for the subsequent jump to out: is never true.
Andre Noll [Mon, 8 May 2023 19:25:30 +0000 (21:25 +0200)]
gcrypt: Fix return value of apc_get_pubkey().
The function is supposed to return the key size in bytes, but it
returns the number of *bits*. A consequence of this bug is that
RSA keys which are too short to encrypt our 128 byte buffer are not
rejected as they should be. This is not too serious because we'll fail
later during the encryption step. Fix the bug anyway and clarify the
documentation of apc_get_pubkey().
Andre Noll [Sat, 6 May 2023 14:49:56 +0000 (16:49 +0200)]
error.h: Be more careful with error code masking.
It should never happen that two or more of the three special high bits
(osl, lopsub, system) are set in an integer that stores a paraslash
error value, but gcc-12 can't prove this and complains as follows:
Andre Noll [Sat, 6 May 2023 14:47:21 +0000 (16:47 +0200)]
mp3_afh: Drop unused fields from struct mp3header.
These are never initialized, but still checked in compare_headers(), so
gcc-12 is right when it complains about uninitialized use. Fix this by
simply removing the uninitialized fields and the comparisons. Fix also
a whitespace issue in the definition of compare_headers() while at it.
Andre Noll [Tue, 24 Jan 2023 18:57:33 +0000 (19:57 +0100)]
server: ls -l=c: Don't print chunk table in case of dynamic chunks.
The chunk table stored in the osl disk object of the paraslash
database is useless for audio formats which support dynamic chunks
(aac only). Omit this part of the ls output.
Andre Noll [Tue, 24 Jan 2023 18:16:50 +0000 (19:16 +0100)]
server: Fix ls -l=c.
This classic copy+paste bug caused ls -l=c to work as if -l=m had
been given. Introduced seven years ago in commit 7af252cbfe13 (server:
Convert com_ls() to lopsub).
Andre Noll [Wed, 9 Nov 2022 19:46:48 +0000 (20:46 +0100)]
server: Fix race condition in com_stat().
We need to block not only SIGTERM but also SIGUSR1 in the command
handler of the stat server command because otherwise the signal is
lost if it arrives within a small race window. If this happens, the
next status update will be up to 50 seconds late. The race condition
is even explained in the comment nearby...
The bug was observed in a situation where the last admissible file
of the current mood became inadmissible, causing the server to stop
streaming. This is reflected by the status flags transition from P
(playing) to N (stopped) via the intermediate state PN (trying to
load next file). After either transition the server process sends
SIGUSR1 to the command handler.
If the second signal arrives just after the PN state was sampled
but before the command handler goes to sleep by calling pselect(2),
the signal handler runs and sets subcmd_should_die, but this won't be
acted upon until after we sleep for up to 50 seconds in pselect(2). As
a result, para_audiod, hence para_gui, keep reporting the stale PN
state during this period.
This bug was present in the code base since day one of the git repo
in 2006.
Andre Noll [Wed, 9 Nov 2022 19:20:26 +0000 (20:20 +0100)]
server: Avoid deadlock in daemon_log().
Currently both the generic signal handler in signal.c and the signal
handler for the stat command handler in command.c call daemon_log()
via PARA_EMERG_LOG(). This is problematic because daemon_log()
takes the log mutex and the signal might arrive while daemon_log()
is executing. If this race condition is hit, the process deadlocks
because daemon_log() tries to acquire a mutex which it already holds.
All three types of server processes (main, afs and command handler)
are susceptible to this bug, but regardless of which process happens
to hit the race window, the server process hangs waiting on the mutex,
and no longer accepts connections.
Fix this by removing the problematic log call in the generic case and
by printing it out of interrupt context in the command handler case.
This bug was introduced together with the log mutex five years ago.
Andre Noll [Mon, 14 Nov 2022 21:16:22 +0000 (22:16 +0100)]
Merge tags 'v0.5.9' and 'v0.6.4' into maint
For some reason, the release commits for 0.5.9 and 0.6.4 releases
(which updated only the NEWS file) did not make it into the maint
branch. This octopus commit merges both tags to correct this omission.
Andre Noll [Mon, 25 Jul 2022 22:08:43 +0000 (00:08 +0200)]
i9e: Fix invalid key handling.
If an unmapped key is pressed repeatedly, we store the key sequence in
a 32 byte buffer until there is no more space left in the buffer. Then
we terminate the process with
This is not a nice way to deal with invalid input, so be a bit more
graceful and discard the buffer when it is full or when there is no
further input available at the moment.
Andre Noll [Mon, 25 Jul 2022 21:20:11 +0000 (23:20 +0200)]
i9e: Fix braino in i9e_post_select().
Due to this bug we mishandled the case where the read() returns zero
to indicate EOF. In this case we stuffed a random character instead
of shutting down the i9e task.
Andre Noll [Sat, 19 Mar 2022 22:48:18 +0000 (23:48 +0100)]
vss: Reset afhi.chunks_total on eof.
Without this, the server can be crashed by running
para_client nomore # set the nomore flag
# wait for eof
para_client jmp 50 # set the repos flag, clear the next flag
para_client play # boom
The problem is that the command handler of the jmp command checks
afhi.chunks_total to determine if some audio file is currently
open. Since vss_eof() did not reset chunks_total, the command handler
wrongly believes that there is an open audio file, sets the repos
flag and clears the next flag. When streaming is resumed later, the
virtual streaming system attempts to access the chunk table which
was freed earlier in vss_eof().
Andre Noll [Mon, 14 Mar 2022 18:52:46 +0000 (19:52 +0100)]
afs: Update dummy mood assumptions to reflect the reality.
The code in afs.c assumes that loading the dummy mood always succeeds,
and this is even documented in change_current_mood(). However, this
has never been true because we call into osl library functions which
may fail for various reasons. In particular, if the server is started
without a database the attempt to load the dummy mood fails because
the audio file table does not exist.
The current code was not prepared to handle this case, and does stupid
things like storing the negative error code in *num_admissible and
returning success.
Fix this confusion by adjusting the documentation and letting
activate_mood_or_playlist() fail early. One of its callers,
init_admissible_files(), needs also be adjusted because it asserted
in its error path that the mood which failed to load was not the
dummy mood.
This is a benign bug because the most common way to hit this is
at startup on a fresh install when the database does not exist. In
this case the caller, init_admissible_files(), ignores the negative
num_admissible value.
Andre Noll [Tue, 8 Mar 2022 22:37:08 +0000 (23:37 +0100)]
mood.c: Fix memory leak in change_current_mood().
In two error cases we return without freeing the bison mood parser
and the temporary array. Worse, in these cases we also expose the
partially loaded mood via the global current_mood.
The good news is that these errors should be "impossible" to trigger
in practice.
Andre Noll [Thu, 4 Nov 2021 16:15:26 +0000 (17:15 +0100)]
paraslash 0.6.4
Another v0.6 release to mark the destination of the maint branch
which will now be fast-forwarded to this commit. Subsequent merges
of topic branches into master will incorporate incompatible changes,
so from now on the master branch should be regarded as pre-0.7.
Andre Noll [Thu, 4 Nov 2021 15:56:56 +0000 (16:56 +0100)]
paraslash 0.5.9
A final v0.5-release to record the tip of the maint branch when
paraslash-0.5 became EOL. Shortly after this commit the 0.6.4 release
will be drawn from master, and maint will be fast-forwarded to point
to the v0.6.4 commit.
Andre Noll [Tue, 26 Oct 2021 18:19:58 +0000 (20:19 +0200)]
string: Remove malloc attribute from para_realloc().
Quoting from the corresponding section of the gcc-10 manual:
This tells the compiler that a function is 'malloc'-like, i.e.,
that the pointer P returned by the function cannot alias any other
pointer valid when the function returns, and moreover no pointers to
valid objects occur in any storage addressed by P.
Using this attribute can improve optimization. Compiler predicts
that a function with the attribute returns non-null in most cases.
Functions like 'malloc' and 'calloc' have this property because they
return a pointer to uninitialized or zeroed-out storage. However,
functions like 'realloc' do not have this property, as they can return
a pointer to storage containing pointers.
Found by code inspection, the unpached code never caused problems.
Also, the function definition in string.c does not contain the
attribute.
Andre Noll [Tue, 5 Oct 2021 19:31:06 +0000 (21:31 +0200)]
client_common: Improve documentation of client_{pre,post}_select().
It was outdated and not worded very well. In particular, it referred
to a task pointer although the argument is named "context". Also,
client_open() does not return a "client data structure", so talk
about the effect of that function rather than its return value.
Andre Noll [Sun, 5 Sep 2021 20:38:41 +0000 (22:38 +0200)]
Remove ->fd of struct audio file data.
This structure contains information about the next audio file. It
is stored in a shared memory area, and a reference to this area is
sent through a pipe from the afs process to the server process. The
file descriptor of the next audio file, however, must be passed via
Unix socket magic (SCM_RIGHTS) and thus does not need to be part of
the structure.
Moreover, it's easier to define the afd structure in
open_and_update_audio_file() of aft.c rather than in its caller,
open_next_audio_file() of afs.c, because the caller only needs the
fd of the audio file and the shared memory ID but not the audio file
data structure itself.
Expand the documentation of open_and_update_audio_file() a bit while
at it.
Andre Noll [Sun, 5 Sep 2021 19:36:55 +0000 (21:36 +0200)]
afs: Improve error diagnostics if no admissible files are found.
Currently, the server prints something like the following with
loglevel error:
Sep 05 21:19:42 (4) (31845) open_next_audio_file: key not found in rbtree
Sep 05 21:19:42 (4) (31844) recv_afs_result: afs code: 1, expected: 0
Sep 05 21:19:42 (4) (31844) recv_afs_result: did not receive open fd from afs
This is both cryptic and scary, given that this error is handled by
simply clearing the play bit from the vss status flags.
This commit changes the code to only print one clear log message with
loglevel notice:
Sep 05 21:34:45 (3) (5233) log_statistics: no admissible files
Andre Noll [Tue, 21 Sep 2021 12:09:39 +0000 (14:09 +0200)]
server: Wait for command handler exit also when afs dies.
When para_server is running in foreground mode in a terminal session,
and gets signalled by hitting CTRL+C, it is unspecified whether the
server or the afs process receive the resulting SIGINT first. It may
even happen that the afs process dies first, and that the server sees
the resulting SIGCHLD *before* the SIGINT.
In this case we currently don't wait for the command handlers to exit
but proceed right away with the shutdown, closing the signal pipe and
destroying the shared memory area which contains the mmd structure.
This leads to error messages on shutdown such as
This commit avoids the issue by letting the server wait for all
its children also in the SIGCHILD case when we exit because the afs
process has terminated.
Andre Noll [Mon, 20 Sep 2021 18:42:37 +0000 (20:42 +0200)]
vss: Avoid double free on exit.
When para_server fails to receive the fd for the next audio file,
the memory pointed to by mmd->afd.afhi.chunk_table is freed but the
pointer is not set to NULL. If the failure was due to server and afs
receiving SIGINT, the subsequent signal handling code might attempt
to free the chunk table again. This double free error is detected by
glibc, which results resulting in messages such as
Andre Noll [Mon, 20 Sep 2021 17:15:12 +0000 (19:15 +0200)]
vss: Handle empty chunk groups gracefully.
The assertion in compute_group_size() triggers if the stream is
positioned right at the end of the file when the next chunk group
starts. This was observed with an mp3 file and the udp sender when
pausing and restarting the stream at the end of the file.
Fix this braino by returning EOF instead of aborting if the next
chunk group happens to be empty.
Andre Noll [Mon, 20 Sep 2021 18:28:42 +0000 (20:28 +0200)]
upd sender: Don't send FEC EOF from command handler context.
Without this, the EOF packet might be sent twice: once by the command
handler which stopped the stream and once by the server process. This
does not hurt, but results in additional unnecessary network traffic,
so return early from udp_close_target() when we're running in command
handler context.
Andre Noll [Thu, 26 Aug 2021 17:31:25 +0000 (19:31 +0200)]
afh: Avoid memory leak at exit.
We missed to free the lopsub parse result. This is not a real leak
because it's a one-off allocation and we are about to exit anyway. It's
worth to fix nevertheless, though, because with the patch applied,
valgrind says "no leaks are possible". Hence any other output means
we have introduced a new memory leak.
Andre Noll [Fri, 13 Aug 2021 19:47:47 +0000 (21:47 +0200)]
aac_afh: Fix check of return value of mp4ff_meta_update().
This function returns zero on failure, and one on success, so the
current check for a negative return value is incorrect. The call to
mp4ff_meta_get_by_index() suffers from the same mistake.
Andre Noll [Sat, 3 Jul 2021 12:36:43 +0000 (14:36 +0200)]
com_jmp(): Handle negative values gracefully.
Currently these get silently converted to a (large) unsigned number,
which causes para_server to skip to the next audio file. This patch
modifies the command handler to check whether the given value is
within range and fails the command if it is out of range.
Andre Noll [Tue, 20 Aug 2019 07:10:53 +0000 (09:10 +0200)]
Avoid warning about sys/sysctl.h on glibc-2.30.
From glibc-2.30 NEWS:
The Linux-specific <sys/sysctl.h> header and the sysctl function have
been deprecated and will be removed from a future version of glibc.
Compilation against the glibc-2.30 headers results in the following warning:
In file included from ipc.c:10:
/usr/include/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
On NetBSD and FreeBSD, however, we still need to include the header
to get the declaration of sysctlbyname(3).
This patch changes ipc.c to include sys/sysctl.h only if __FreeBSD__ or
__NetBSD__ is defined. Also remove the pointless check for __APPLE__.
Andre Noll [Thu, 6 May 2021 18:29:06 +0000 (20:29 +0200)]
server: Don't crash on blank moods.
We special-case empty mood definitions (because we can't map the
osl object anyway), but we don't check whether the mood definition
contains anything else than whitespace or comments.
Such blank mood definitions result in an empty abstract syntax tree
indicated by ->ast of the mood parser's context structure being
NULL. We happily dereference that pointer in mp_eval_row() and die
by the resulting SIGSEGV.
The fix is trivial: simply treat blank moods in the same way as the
dummy mood, i.e. regard each audio file as admissible.
Andre Noll [Wed, 28 Apr 2021 11:17:03 +0000 (13:17 +0200)]
aft: Silence format-overflow warning with gcc-10.
aft.c: In function 'print_list_item':
aft.c:736:17: warning: '%*u' directive writing between 1 and 65529 bytes into a region of size 30 [-Wformat-overflow=]
736 | sprintf(buf, "%*u:%02u:%02d", max_width - 6, hours, mins,
| ^~~
aft.c:736:16: note: directive argument in the range [1, 4294967295]
736 | sprintf(buf, "%*u:%02u:%02d", max_width - 6, hours, mins,
| ^~~~~~~~~~~~~~~
aft.c:736:16: note: directive argument in the range [-59, 59]
aft.c:736:3: note: 'sprintf' output between 8 and 65545 bytes into a destination of size 30
736 | sprintf(buf, "%*u:%02u:%02d", max_width - 6, hours, mins,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
737 | seconds % 60);
| ~~~~~~~~~~~~~
The code is correct but gcc can't prove it. Silence the warning by
passing the size of the buffer and asserting that it won't overflow
before printing to it.
Andre Noll [Thu, 8 Apr 2021 15:12:02 +0000 (17:12 +0200)]
manual: Fix dead audiocoding.com link.
As pointed out by Sven, audiocoding.com has been out of service and
shut down the website since August of 2020. The library is still
available for download on the sourceforge project page, so link to
that page instead.
Andre Noll [Mon, 5 Apr 2021 18:29:28 +0000 (20:29 +0200)]
prebuffer: Remove buffer tree node on errors.
When the ->post_select method of a filter returns negative, it *must*
remove its buffer tree node as well. The prebuffer missed to do that,
which results in a stale reference to the buffer tree which keeps
the audiod slot busy. When no more slots are free, audiod hangs or
exits with a "no more free slots" message. This patch avoids this.
Andre Noll [Thu, 7 Jan 2021 23:55:13 +0000 (00:55 +0100)]
alsa_write: Avoid hung tasks.
Without this fix the alsa writer may never shutdown, occupying a
slot of audiod. The hang was observed with in conjunction to the
udp receiver and the prebuffer filter. See also the recent commit 23913cbbfc98.
Andre Noll [Fri, 16 Oct 2020 13:49:47 +0000 (15:49 +0200)]
aft: Avoid NULL pointer dereference.
osl_get_object() must not be called with a NULL row pointer. Currently
this may happen on blob events. This patch avoids the problem and
makes sure we catch this programming error early.
Andre Noll [Fri, 1 Jan 2021 15:05:56 +0000 (16:05 +0100)]
prebuffer: Bail out on bufffer tree errors.
Without this, the prebuffer filter might stay active forever, occupying
a slot of para_audiod until no more slots are available. This was
observed with the udp receiver.
Andre Noll [Mon, 1 Jun 2020 17:28:01 +0000 (19:28 +0200)]
Replace /* fallthrouth*/ by __attribute__ ((fallthrough));
Some (recent) gcc versions still complain because the switch case
falls through. The new code causes a warning on old compilers which
don't know the fallthrough attribute, but this is still better than
seeing the warning on systems with a recent compiler.
Andre Noll [Fri, 29 May 2020 23:22:49 +0000 (01:22 +0200)]
aft: Avoid invalid read.
A short chunk table is fatal for all audio formats except aac,
which employs dynamic chunks. The below valgrind spat was found when
para_server tried to open an aac audio file. Setting afhi->chunk_table
to NULL in this case should fix it.
==17667== Invalid read of size 4
==17667== at 0x805A862: write_u32 (portable_io.h:95)
==17667== by 0x805A862: save_chunk_table (aft.c:402)
==17667== by 0x805A862: save_chunk_table (aft.c:395)
==17667== by 0x805DDE6: save_afd (aft.c:616)
==17667== by 0x805DDE6: open_and_update_audio_file (aft.c:1113)
==17667== by 0x8058AA2: open_next_audio_file (afs.c:425)
==17667== by 0x8058AA2: execute_server_command (afs.c:867)
==17667== by 0x8058AA2: command_post_select.part.0 (afs.c:921)
==17667== by 0x8063062: call_post_select (sched.c:80)
==17667== by 0x8063062: sched_post_select (sched.c:106)
==17667== by 0x8063062: schedule (sched.c:159)
==17667== by 0x8059643: afs_init (afs.c:1006)
==17667== by 0x804D747: init_afs (server.c:529)
==17667== by 0x804D747: server_init (server.c:601)
==17667== by 0x804D747: main (server.c:690)
==17667== Address 0x4d7dcd0 is 0 bytes after a block of size 40 alloc'd
==17667== at 0x40365E2: malloc (vg_replace_malloc.c:309)
==17667== by 0x8053AB6: para_malloc (string.c:63)
==17667== by 0x805B20D: load_chunk_table (aft.c:415)
==17667== by 0x805DD65: open_and_update_audio_file (aft.c:1103)
==17667== by 0x8058AA2: open_next_audio_file (afs.c:425)
==17667== by 0x8058AA2: execute_server_command (afs.c:867)
==17667== by 0x8058AA2: command_post_select.part.0 (afs.c:921)
==17667== by 0x8063062: call_post_select (sched.c:80)
==17667== by 0x8063062: sched_post_select (sched.c:106)
==17667== by 0x8063062: schedule (sched.c:159)
==17667== by 0x8059643: afs_init (afs.c:1006)
==17667== by 0x804D747: init_afs (server.c:529)
==17667== by 0x804D747: server_init (server.c:601)
==17667== by 0x804D747: main (server.c:690)
Andre Noll [Mon, 16 Mar 2020 17:44:07 +0000 (18:44 +0100)]
mp: Always set mp_context to NULL on errors.
In mp_init(), if mp_yyparse() fails, we return early without setting
the result pointer to NULL. This does not matter much because both
callers of mood.c pass in NULL, but still..
Andre Noll [Fri, 12 Jun 2020 01:34:32 +0000 (03:34 +0200)]
vss: Rework fec client setup.
The current fec code assumes that the chunks of the audio file form a
contigous buffer. At least for aac/m4a this is not true, which is
why streaming m4a files over udp never worked well.
This patch should be a big improvement in this regard. We now copy
the chunks to preallocated buffers, which also makes the code easier
to follow because we can get rid of the two extra buffers in struct
fec_client.
Andre Noll [Sat, 6 Jun 2020 16:50:48 +0000 (18:50 +0200)]
gui: Adjust position of num_played value.
If the terminal window is only 80 characters wide, the num_played
value may be adjacent to the bitrate value, with no space between.
This happens only if the num_played value is bigger than 99, and only
with the "colorful blackness" theme.
Andre Noll [Thu, 11 Jun 2020 13:28:49 +0000 (15:28 +0200)]
Avoid audiod hangs when prebuffer filter is active.
This filter misses to honor task notifications. As a result of this
omission, when CTRL+C is pressed while audiod is running in foreground
mode and the prebuffer filter is active, the audiod process hangs.
Andre Noll [Mon, 23 Mar 2020 20:19:14 +0000 (21:19 +0100)]
Merge branch 'refs/heads/t/stale-pointer-fix'
This bug only triggered if the kernel changes the address of the memory
mapping of the audio file table after a file was added, and a subsequent
operation would access the then stale pointer.
Cooking for a week.
* refs/heads/t/stale-pointer-fix:
Don't use strdup() to copy hash.
aft: Avoid stale pointer pointer reference.
Andre Noll [Sun, 2 Feb 2020 15:26:16 +0000 (16:26 +0100)]
aft: Avoid stale pointer pointer reference.
We can't rely on the ->hash and ->path pointers of struct
status_item_ls_data because they both become stale when the audio
file table gets remapped. This happens for example when a new audio
file is added while another audio file is currently open. A subsequent
addblob command then triggers a re-initialization of the status items,
which reads from the stale pointer location.
This usually results in garbage in the stat output, but can also lead
to a segfault or worse. Avoid this from happening by creating a copy
of the hash and the path.
This bug has been present for a long time. It was hard to debug
because often no invalid memory accesses occur, hence valgrind does
not complain.
Andre Noll [Sun, 15 Mar 2020 14:51:20 +0000 (15:51 +0100)]
Merge branch 'refs/heads/t/mixer'
A single patch for para_mixer which makes the subcommands which
sleep a bit more robust.
The merge conflicted due to commit d6b25bf854c1 (mixer: fade: Handle
empty mood strings gracefully) from half a year ago, but the resolution
was obvious.
Cooking for nine months.
* refs/heads/t/mixer:
mixer: sleep/snooze: Close mixer during sleep.
Andre Noll [Sun, 24 Nov 2019 16:33:51 +0000 (17:33 +0100)]
mp3_afh: Don't bail out on short files.
It's perfectly OK to have mp3 files which are shorter than two seconds.
For example lexico.com offers mp3 downloads to learn the pronuciation
of single words. These files are often shorter than one second.
The check for short length files predates the git history. Most likely
it was added for no good reason, so drop it.
Andre Noll [Wed, 11 Sep 2019 20:12:32 +0000 (22:12 +0200)]
openssl: Fix (harmless) memory leaks at exit.
Without this, valgrind --leak-check=full --show-leak-kinds=all
complains about four memory blocks reachable at exit, see below.
The first leak is fixed by the new call to ERR_remove_thread_state(),
which frees the error queue of the current thread. To squash the
other three, the call to EVP_cleanup() is needed to remove all of
openssl's internal ciphers and digests.
To make this work on both openssl-1.0 and for openssl-1.1, we need
to add additional header checks for configure.
---
==2818== 12 bytes in 1 blocks are still reachable in loss record 1 of 4
==2818== at 0x40355EE: malloc (vg_replace_malloc.c:309)
==2818== by 0x41B887C: CRYPTO_malloc (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x42459B7: lh_insert (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4248542: int_thread_set_item (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4249920: ERR_get_state (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x424A255: ERR_put_error (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4222EF6: RSA_padding_check_PKCS1_OAEP_mgf1 (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x422306A: RSA_padding_check_PKCS1_OAEP (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x421F921: RSA_eay_private_decrypt (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x804F2E9: apc_priv_decrypt (openssl.c:206)
==2818== by 0x804DB59: client_post_select (client_common.c:321)
==2818== by 0x804CC57: call_post_select (sched.c:80)
==2818== by 0x804CC57: sched_post_select (sched.c:106)
==2818== by 0x804CC57: schedule (sched.c:159)
==2818==
==2818== 64 bytes in 1 blocks are still reachable in loss record 2 of 4
==2818== at 0x40355EE: malloc (vg_replace_malloc.c:309)
==2818== by 0x41B887C: CRYPTO_malloc (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4245643: lh_new (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x424811F: int_thread_get (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4248511: int_thread_set_item (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4249920: ERR_get_state (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x424A255: ERR_put_error (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4222EF6: RSA_padding_check_PKCS1_OAEP_mgf1 (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x422306A: RSA_padding_check_PKCS1_OAEP (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x421F921: RSA_eay_private_decrypt (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x804F2E9: apc_priv_decrypt (openssl.c:206)
==2818== by 0x804DB59: client_post_select (client_common.c:321)
==2818==
==2818== 96 bytes in 1 blocks are still reachable in loss record 3 of 4
==2818== at 0x40355EE: malloc (vg_replace_malloc.c:309)
==2818== by 0x41B887C: CRYPTO_malloc (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4245628: lh_new (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x424811F: int_thread_get (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4248511: int_thread_set_item (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4249920: ERR_get_state (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x424A255: ERR_put_error (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4222EF6: RSA_padding_check_PKCS1_OAEP_mgf1 (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x422306A: RSA_padding_check_PKCS1_OAEP (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x421F921: RSA_eay_private_decrypt (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x804F2E9: apc_priv_decrypt (openssl.c:206)
==2818== by 0x804DB59: client_post_select (client_common.c:321)
==2818==
==2818== 400 bytes in 1 blocks are still reachable in loss record 4 of 4
==2818== at 0x40355EE: malloc (vg_replace_malloc.c:309)
==2818== by 0x41B887C: CRYPTO_malloc (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x424988C: ERR_get_state (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x424A255: ERR_put_error (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x4222EF6: RSA_padding_check_PKCS1_OAEP_mgf1 (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x422306A: RSA_padding_check_PKCS1_OAEP (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x421F921: RSA_eay_private_decrypt (in /usr/local/lib/libcrypto.so.1.0.0)
==2818== by 0x804F2E9: apc_priv_decrypt (openssl.c:206)
==2818== by 0x804DB59: client_post_select (client_common.c:321)
==2818== by 0x804CC57: call_post_select (sched.c:80)
==2818== by 0x804CC57: sched_post_select (sched.c:106)
==2818== by 0x804CC57: schedule (sched.c:159)
==2818== by 0x804AB2D: main (client.c:656)
Andre Noll [Fri, 28 Feb 2020 17:13:50 +0000 (18:13 +0100)]
Merge branch 'refs/heads/t/ogg_afh'
A patch which teaches the ogg/* audio format handlers to report the
correct length for files with holes. A bug was found in that patch
after the branch had been merged to next, so there's a fixup commit
on top.
The second patch in this series fixes an issue with
ogg_page_granulepos() that can result in incorrect estimates for the
duration of files that use the ogg container format.
Cooking for a year.
* refs/heads/t/ogg_afh:
ogg_afh_common.c: Check return value of ogg_page_granulepos().
ogg_afh_common: Fix signedness issue.
ogg: Detect missing ogg pages.
Andre Noll [Sat, 2 Nov 2019 13:47:15 +0000 (14:47 +0100)]
vss: Improve error diagnostics.
Unless in debug loglevel, para_server prints
Nov 01 17:06:03 (4) (18596) open_next_audio_file: key not found in rbtree
Nov 01 17:06:03 (4) (18595) recv_afs_result: did not receive open fd from afs
which does not include information about what was actually received.
Andre Noll [Sat, 2 Nov 2019 13:59:29 +0000 (14:59 +0100)]
command.c: Also invalidate play time if no audio file is open.
Without this, the time string of the previous audio file is continued
to be shown in the top window of para_gui when stopped. It gets
wiped out eventually, but this can take a few seconds. With the patch
applied, the time string disappears immediately.
Andre Noll [Sat, 23 Nov 2019 17:20:21 +0000 (18:20 +0100)]
Merge branch 'refs/heads/t/ssh'
A medium sized series which teaches both crypto backends about the
RFC4716 key format, which has become the default for ssh-keygen as
of openssh-7.8.
Was cooking for almost a year.
* refs/heads/t/ssh:
manual: Instruct the user to create RFC4716 keys.
openssl: Add support for RFC4716 keys
openssl: Move get_private_key() down.
gcrypt: Add support for RFC4716 private keys.
crypt: Rename decoding functions.
gcrypt: Introduce read_openssh_bignum().
gcrypt: Factor out read_pem_rsa_params().
gcrypt: Let read_bignum() return bits, not bytes.
gcrypt: Let decode_key() return blob size through additional argument.
gcrypt: Drop unnecessary arguments of decode_key().
Andre Noll [Tue, 20 Aug 2019 07:10:53 +0000 (09:10 +0200)]
Avoid warning about sys/sysctl.h on glibc-2.30.
From glibc-2.30 NEWS:
The Linux-specific <sys/sysctl.h> header and the sysctl function have
been deprecated and will be removed from a future version of glibc.
Compilation against the glibc-2.30 headers results in the following warning:
In file included from ipc.c:10:
/usr/include/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
On NetBSD and FreeBSD, however, we still need to include the header
to get the declaration of sysctlbyname(3).
This patch changes ipc.c to include sys/sysctl.h only if __FreeBSD__ or
__NetBSD__ is defined. Also remove the pointless check for __APPLE__.
Andre Noll [Sun, 1 Sep 2019 11:18:41 +0000 (13:18 +0200)]
Merge branch 'refs/heads/t/afh'
A couple of patches which remove ->init of struct audio_format_handler
and struct receiver.
Cooking for 9 months.
* refs/heads/t/afh:
Remove ->init() of struct receiver.
afh: Constify definition of audio format handlers.
afh: Introduce audio_format_names[].
afh: Get rid of dummy entry at the end of afl[].
afh: Minor simplification for afh_get_chunk().
afh: Move audio_format_name() up.
Andre Noll [Sat, 24 Aug 2019 11:38:29 +0000 (13:38 +0200)]
Merge branch 'refs/heads/t/compress'
A short series which overhauls the algorithm behind the compress
filter and its documentation.
Cooking for almost a year.
* refs/heads/t/compress:
compress: Overhaul the meaning of --aggressiveness.
compress: Apply damping later.
compress: Warn when samples are clipped.
compress: Document and sanity-check command line options.
compress: Fix off by one in help of --target-level.