* [PATCH] libdvbv5: Fix dvb-format-convert segfault
@ 2016-03-18 12:58 Edward Sheldrake
0 siblings, 0 replies; only message in thread
From: Edward Sheldrake @ 2016-03-18 12:58 UTC (permalink / raw)
To: linux-media
Fixes dvb-format-convert crashing when encountering an
unrecognised polarization value.
Signed-off-by: Edward Sheldrake <ejsheldrake@gmail.com>
---
lib/libdvbv5/dvb-file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/libdvbv5/dvb-file.c b/lib/libdvbv5/dvb-file.c
index 3fda65f..fc2bebc 100644
--- a/lib/libdvbv5/dvb-file.c
+++ b/lib/libdvbv5/dvb-file.c
@@ -648,8 +648,8 @@ static int fill_entry(struct dvb_entry *entry, char *key, char *value)
else if (!strcasecmp(key, "AUDIO_PID"))
is_audio = 1;
else if (!strcasecmp(key, "POLARIZATION")) {
- for (j = 0; ARRAY_SIZE(dvb_sat_pol_name); j++)
- if (!strcasecmp(value, dvb_sat_pol_name[j]))
+ for (j = 0; j < ARRAY_SIZE(dvb_sat_pol_name); j++)
+ if (dvb_sat_pol_name[j] && !strcasecmp(value, dvb_sat_pol_name[j]))
break;
if (j == ARRAY_SIZE(dvb_sat_pol_name))
return -2;
--
2.5.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-18 12:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 12:58 [PATCH] libdvbv5: Fix dvb-format-convert segfault Edward Sheldrake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).