[linux-dvb] Fix of enum usage in tzap

P.Nejedly at sh.cvut.cz P.Nejedly at sh.cvut.cz
Thu Jun 14 12:44:36 CEST 2007


Hi,

Please find attached the patch that corrects enum usage in tzap code.
The problem is that the code passes enum references as int*, which is not
correct in some cases. There are ABIs for which sizeof(int) != sizeof(enum),
so a function using the pointer for writing to an enum field as int* clobbers
nearby data (other structure members, in this case).

One example of such an ABI is ARMs EABI and I'm using tzap on one embedded box
based on ARM EABI (Buffalo LinkStation Pro). Original tzap code was not able
to tune (passing e.g. code_rate_HP as invalid FEC_NONE, while channels.conf
contained FEC_2_3), after the patch, it works for me.

I didn't inspect othet code too carefully, but it seems that other channels
file parsers in dvb-apps are OK (except czap?).

Nenik

Signed-off-by: Petr Nejedly <nenik at stoupa.sh.cvut.cz>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: tzap-7a542662a1bd.patch
Type: application/octet-stream
Size: 2956 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20070614/6058f215/attachment.obj 


More information about the linux-dvb mailing list