diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2009-06-01 11:45:52 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2009-06-01 11:45:52 +0200 |
commit | 6f912d247fdb4f16c99e6e974f5a4d0b59dfd80f (patch) | |
tree | 52cd2db826c7ac2c19048c0c10726f78ece26663 | |
parent | bad922e955e9109de08223dc74bb7221c61d595e (diff) | |
download | vdr-6f912d247fdb4f16c99e6e974f5a4d0b59dfd80f.tar.gz vdr-6f912d247fdb4f16c99e6e974f5a4d0b59dfd80f.tar.bz2 |
Fixed handling the length of DiSEqC command sequences
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | dvbdevice.c | 6 |
3 files changed, 5 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4159b66f..99463b7b 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1219,6 +1219,7 @@ Reinhard Nissl <rnissl@gmx.de> for reporting a problem in case the PIDs change during recording for reporting a memory leak when reaching the end of a recording during replay for reporting a call to close(-1) in cUnbufferedFile::Close() + for reporting a possible problem in handling the length of DiSEqC command sequences Richard Robson <richard_robson@beeb.net> for reporting freezing replay if a timer starts while in Transfer Mode from the @@ -6117,3 +6117,4 @@ Video Disk Recorder Revision History - Fixed calling close(-1) in cUnbufferedFile::Close() (reported by Reinhard Nissl). - Added a workaround for the broken linux-dvb driver header files (based on a patch from Tobias Grimm). +- Fixed handling the length of DiSEqC command sequences (reported by Reinhard Nissl). diff --git a/dvbdevice.c b/dvbdevice.c index f8e176fc..a57693e4 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 2.18 2009/05/15 11:08:18 kls Exp $ + * $Id: dvbdevice.c 2.19 2009/06/01 11:42:06 kls Exp $ */ #include "dvbdevice.h" @@ -232,8 +232,8 @@ bool cDvbTuner::SetFrontend(void) uchar *codes = diseqc->Codes(n); if (codes) { struct dvb_diseqc_master_cmd cmd; - memcpy(cmd.msg, codes, min(n, int(sizeof(cmd.msg)))); - cmd.msg_len = n; + cmd.msg_len = min(n, int(sizeof(cmd.msg))); + memcpy(cmd.msg, codes, cmd.msg_len); CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, &cmd)); } } |