1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Fixed buffer handling in cSatipTuner::ParseReceptionParameters().

This commit is contained in:
Rolf Ahrenberg 2014-11-16 15:00:08 +02:00
parent adddf3e4e7
commit 02bf42b006

View File

@ -234,13 +234,14 @@ bool cSatipTuner::Disconnect(void)
void cSatipTuner::ParseReceptionParameters(u_char *bufferP, int lengthP) void cSatipTuner::ParseReceptionParameters(u_char *bufferP, int lengthP)
{ {
//debug("cSatipTuner::%s(%s, %d) [device %d]", __FUNCTION__, bufferP, lengthP, deviceIdM); //debug("cSatipTuner::%s(%d) [device %d]", __FUNCTION__, lengthP, deviceIdM);
// DVB-S2: // DVB-S2:
// ver=<major>.<minor>;src=<srcID>;tuner=<feID>,<level>,<lock>,<quality>,<frequency>,<polarisation>,<system>,<type>,<pilots>,<roll_off>,<symbol_rate>,<fec_inner>;pids=<pid0>,...,<pidn> // ver=<major>.<minor>;src=<srcID>;tuner=<feID>,<level>,<lock>,<quality>,<frequency>,<polarisation>,<system>,<type>,<pilots>,<roll_off>,<symbol_rate>,<fec_inner>;pids=<pid0>,...,<pidn>
// DVB-T2: // DVB-T2:
// ver=1.1;tuner=<feID>,<level>,<lock>,<quality>,<freq>,<bw>,<msys>,<tmode>,<mtype>,<gi>,<fec>,<plp>,<t2id>,<sm>;pids=<pid0>,...,<pidn> // ver=1.1;tuner=<feID>,<level>,<lock>,<quality>,<freq>,<bw>,<msys>,<tmode>,<mtype>,<gi>,<fec>,<plp>,<t2id>,<sm>;pids=<pid0>,...,<pidn>
if (lengthP > 0) { if (lengthP > 0) {
char *s = strdup((char *)bufferP); char *s = strndup((char *)bufferP, lengthP);
//debug("cSatipTuner::%s(%s) [device %d]", __FUNCTION__, s, deviceIdM);
char *c = strstr(s, ";tuner="); char *c = strstr(s, ";tuner=");
if (c) { if (c) {
int value; int value;