Bug 77479

Summary: sysutils/lineakd fails to run on AMD64 [patch]
Product: Ports & Packages Reporter: Axel Gonzalez <loox>
Component: Individual Port(s)Assignee: Pav Lucistnik <pav>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Axel Gonzalez 2005-02-14 07:20:19 UTC
Make and install of lineakd goes well, but when you try to run, you get endless messages like:

$ lineakd -l
Attempted to add an empty toggle name:  to object: Back
Attempted to add an empty toggle name:  to object: Back
Attempted to add an empty toggle name:  to object: Back
..

(listing the keyboards, or trying to run the daemon)

CPU usage goes to 100%

Fix: The problem is due to a bug in the routine that loads the keyboards list (lineakkb.def).

At some point it tries to compare 32 unsigned int to 64 bit unsigned it, the result is 2^32-1 != 2^64-1, so it fails, and gets in an endless loop.

This patch fixes the problem (and should be ok with 32 bits platforms):

**** begin patch-lineak__defloader.cpp ***
How-To-Repeat: Install lineakd from ports

$ lineakd -l

or

$ lineakd
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2005-02-14 21:18:37 UTC
Dear maintainer of FreeBSD port sysutils/lineakd, please take a look at

http://www.freebsd.org/cgi/query-pr.cgi?q=77479

Do you approve this patch?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

It's the classic Microsoft security-bulletin formula: "The vulnerability is
important (never dangerous); you have nothing to fear and no reason to regret
trusting us; we have no intention of apologizing for it or even explaining it
adequately; now go get your patch, shut up, and be grateful nothing bad has
happened.
  -- The Register
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2005-02-14 21:18:40 UTC
State Changed
From-To: open->feedback

Asked maintainer for opinion. 


Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2005-02-14 21:18:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Handle.
Comment 4 Kay Lehmann 2005-02-15 07:59:43 UTC
Hello,

the patch is ok, but it is missing a line, which needs some change, too. 
Exactly this problem was fixed in cvs of lineak last week. I will fill 
another pr, including the patches from cvs as soon as possible.

Greets,
Kay

Pav Lucistnik schrieb:
> Dear maintainer of FreeBSD port sysutils/lineakd, please take a look at
> 
> http://www.freebsd.org/cgi/query-pr.cgi?q=77479
> 
> Do you approve this patch?
>
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2005-02-15 08:48:59 UTC
State Changed
From-To: feedback->suspended

Waiting for maintainer's patch.
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2005-02-15 22:03:21 UTC
State Changed
From-To: suspended->closed

Problem fixed in CVS! Thank you for your report.