]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
audiod: Fix error checking in init_default_filters(). maint
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 17 May 2023 20:13:55 +0000 (22:13 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 30 May 2023 20:27:51 +0000 (22:27 +0200)
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.

This bug was introduced 13 years ago.

Fixes: 081ea8699e6a309c44446884b8c3752529d96a25
audiod.c

index 88599c3fa297337b6a3f598b31f92d6e6b4b0993..2b2b7287f29c4268b1b22381a1f66b52096be74b 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -945,7 +945,7 @@ static int init_default_filters(void)
                 */
                if (strcmp(name, "udp") == 0 || strcmp(name, "dccp") == 0) {
                        tmp = para_strdup("fecdec");
-                       add_filter(i, tmp);
+                       ret = add_filter(i, tmp);
                        free(tmp);
                        if (ret < 0)
                                goto out;