Skip to content

Commit

Permalink
ARM: fix dereferencing misaligned pointers
Browse files Browse the repository at this point in the history
Linear ring buffer generates problems on ARM when reading and writing short
pointers. This was leading to CI communication problems with VDR, resulting
with the following info in the log:
'not all devices ready after 30 seconds.'

Fixes #27. Thanks to JeroenT for report, help and testing.
  • Loading branch information
manio committed Aug 17, 2013
1 parent 34dfb90 commit 6bc3f5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Frame.cpp
Expand Up @@ -55,7 +55,8 @@ void Frame::Put(void)
{
if (rb && mem)
{
*((short *) mem) = len;
*mem = len & 0xff;
*(mem+1) = len >> 8;
rb->Put(mem, len + LEN_OFF);
}
}
Expand All @@ -70,7 +71,7 @@ unsigned char *Frame::Get(int &l)
{
if (c > LEN_OFF)
{
int s = *((short *) data);
int s = *data + (*(data+1) << 8);
if (c >= s + LEN_OFF)
{
l = glen = s;
Expand Down
4 changes: 2 additions & 2 deletions README
Expand Up @@ -115,8 +115,8 @@ plugin in case of problems.

To Narog for implementing the multiple adapter support

To Peje, Unixer, Copper, HALLO01, udobroemme, ninjagp for their patience,
support and testing on own hardware.
To Peje, Unixer, Copper, HALLO01, udobroemme, ninjagp, JeroenT for their
patience, support and testing on own hardware.

To the authors of VDR-SC plugin, FFdecsa and Oscam for their great work and
dedication
Expand Down

0 comments on commit 6bc3f5a

Please sign in to comment.