mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Replaced the NULL pointer assignment in ~cReceiver() to force a segfault with a call to abort()
This commit is contained in:
parent
a30563634d
commit
8b2f500d2a
@ -3265,3 +3265,5 @@ Mariusz Bialonczyk <manio@skyboo.net>
|
|||||||
Tony Houghton <h@realh.co.uk>
|
Tony Houghton <h@realh.co.uk>
|
||||||
for suggesting to add LinkageTypePremiere to libsi/si.h and eit.c to avoid a compiler
|
for suggesting to add LinkageTypePremiere to libsi/si.h and eit.c to avoid a compiler
|
||||||
warning with Clang 3.4.1
|
warning with Clang 3.4.1
|
||||||
|
for suggesting to replace the NULL pointer assignment in ~cReceiver() to force a
|
||||||
|
segfault with a call to abort()
|
||||||
|
2
HISTORY
2
HISTORY
@ -8194,3 +8194,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed some compiler warnings with Clang 3.4.1 (reported by Paul Menzel).
|
- Fixed some compiler warnings with Clang 3.4.1 (reported by Paul Menzel).
|
||||||
- Added LinkageTypePremiere to libsi/si.h and eit.c to avoid a compiler warning with
|
- Added LinkageTypePremiere to libsi/si.h and eit.c to avoid a compiler warning with
|
||||||
Clang 3.4.1 (suggested by Tony Houghten).
|
Clang 3.4.1 (suggested by Tony Houghten).
|
||||||
|
- Replaced the NULL pointer assignment in ~cReceiver() to force a segfault with
|
||||||
|
a call to abort() (suggested by Tony Houghten).
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: receiver.c 3.1 2014/01/01 12:03:00 kls Exp $
|
* $Id: receiver.c 3.2 2014/02/08 15:57:30 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "receiver.h"
|
#include "receiver.h"
|
||||||
@ -22,10 +22,10 @@ cReceiver::cReceiver(const cChannel *Channel, int Priority)
|
|||||||
cReceiver::~cReceiver()
|
cReceiver::~cReceiver()
|
||||||
{
|
{
|
||||||
if (device) {
|
if (device) {
|
||||||
const char *msg = "ERROR: cReceiver has not been detached yet! This is a design fault and VDR will segfault now!";
|
const char *msg = "ERROR: cReceiver has not been detached yet! This is a design fault and VDR will abort now!";
|
||||||
esyslog("%s", msg);
|
esyslog("%s", msg);
|
||||||
fprintf(stderr, "%s\n", msg);
|
fprintf(stderr, "%s\n", msg);
|
||||||
*(char *)0 = 0; // cause a segfault
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user