[mythtv] lirc_client.c sending empty CODE cmd to LIRC -> segfault

Michael T. Dean mtdean at thirdcontact.com
Sun Feb 28 19:33:40 UTC 2010

On 02/28/2010 09:40 AM, David Kubicek wrote:
> On 02/13/2010 07:09 PM, Michael T. Dean wrote:
>> On 02/09/2010 10:39 PM, Michael T. Dean wrote:
>> It seems Daniel K modified our version of lirc_client.{h,c} for thread
>> safety before importing it so it has quite a few differences to the
>> upstream version, but I'd still like to see the linefeed fix sent
>> upstream. Also, is your patch for LIRC for the tools/lirc_client.{h,c}
>> code? If so, once it's in the upstream copy, we could easily pull an
>> update from them.
> Hi, I just talked with Christoph Bartelmus of LIRC and we cleared up 
> the newline issue. Remember us talking about this? You said I should 
> let LIRC know about the missing newline and the other bug, because you 
> pull their version and you'd like to have the newline fixed upstream 
> instead of myth.
> It appears the issue is not related to original LIRC code at all, it's 
> just in myth. The thing is their read function leaves newlines in the 
> buffer and that's why their lirc_code2char FMT string cannot have 
> "\n". Christoph said you're using your own read function which removes 
> newlines. Because of this custom read function, you're missing a 
> newline in the CODE command.
> The newline should be added to other changes you apply to upstream 
> lirc_client - well, or change the read function. Let me know if you 
> need more, this is the original post:
> Christoph Bartelmus wrote:
>> The problem is that they don't use lirc_nextcode() in their lirc.cpp but
>> have their own read function, which throws away the newline.
>> lirc_client is the wrong place to add it.
>> lirc_code2char simply expects the newline still to be in the code string.

Thanks for following through and for the update.  I probably should have 
looked deeper into the changes we had in our version--I didn't notice 
the difference in the read.


More information about the mythtv-dev mailing list