Bug #179 ยป vdr-osdteletext-receive-buffer-fix.diff
osdteletext-0.8.3/txtrecv.c 2009-09-14 22:25:01.864478312 +0200 | ||
---|---|---|
Cancel(2);
|
||
}
|
||
}
|
||
void cTxtReceiver::Receive(uchar *Data, int Length)
|
||
{
|
||
int len = Length+60;
|
||
if (!buffer.Check(len)) {
|
||
if (!buffer.Check(Length)) {
|
||
// Buffer overrun
|
||
buffer.Signal();
|
||
return;
|
||
}
|
||
cFrame *frame=new cFrame(Data, len);
|
||
cFrame *frame=new cFrame(Data, Length);
|
||
if (frame && !buffer.Put(frame)) {
|
||
// Buffer overrun
|
||
delete frame;
|
||
buffer.Signal();
|
||
}
|
||
}
|