pcm_convert: use GError for error handling

Don't abort the whole MPD process when the conversion fails.  This has
been a denial-of-service attack vector for years.
This commit is contained in:
Max Kellermann
2009-07-23 12:01:03 +02:00
parent cba126ceb8
commit 54889c72e3
11 changed files with 181 additions and 116 deletions

View File

@@ -44,8 +44,11 @@ pcm_convert(G_GNUC_UNUSED struct pcm_convert_state *state,
G_GNUC_UNUSED const struct audio_format *src_format,
G_GNUC_UNUSED const void *src, G_GNUC_UNUSED size_t src_size,
G_GNUC_UNUSED const struct audio_format *dest_format,
G_GNUC_UNUSED size_t *dest_size_r)
G_GNUC_UNUSED size_t *dest_size_r,
GError **error_r)
{
g_set_error(error_r, pcm_convert_quark(), 0,
"Not implemented");
return NULL;
}