Ticket #7170: programs_mythtranscode_replex_replex.c-fix-unchecked-null-of-apes_abort

File programs_mythtranscode_replex_replex.c-fix-unchecked-null-of-apes_abort, 781 bytes (added by Erik Hovland <erik@…>, 11 years ago)

Check null in replex

Line 
1The pointer apes_abort is set to null and then not properly checked later in the function
2
3From: Erik Hovland <erik@hovland.org>
4
5analyze_audio.
6---
7
8 mythtv/programs/mythtranscode/replex/replex.c |    3 +++
9 1 files changed, 3 insertions(+), 0 deletions(-)
10
11
12diff --git a/mythtv/programs/mythtranscode/replex/replex.c b/mythtv/programs/mythtranscode/replex/replex.c
13index 4c1d7ce..b0c2624 100644
14--- a/mythtv/programs/mythtranscode/replex/replex.c
15+++ b/mythtv/programs/mythtranscode/replex/replex.c
16@@ -549,6 +549,9 @@ void analyze_audio( pes_in_t *p, struct replex *rx, int len, int num, int type)
17                adelay = rx->apts_off[num];
18                filled = &rx->afilled[num];
19                break;
20+       default:
21+               fprintf(stderr, "UNKNOWN AUDIO type %d\n", type);
22+               return;
23        }
24       
25        *apes_abort = 0;