Subject: Re: libradius broken on amd64
To: Martin Husemann <martin@duskware.de>
From: Paulo Alexandre Pinto Pires <p@ppires.org>
List: current-users
Date: 02/20/2005 18:47:38
This is a multi-part message in MIME format.
--------------090300090103020605000902
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Martin Husemann wrote:

>On Sun, Feb 20, 2005 at 05:45:34PM -0300, Paulo Alexandre Pinto Pires wrote:
>  
>
>><>I think lint was just doing its job, alerting about potential problems 
>>that could arise from accuracy lossage and possibly misaligned pointer 
>>casts/arithmetic, for pointed-to variables of different size.
>>    
>>
I've looked at some of the errors, not all.  While I agree that 
complaining about constant arguments to vsnprintf() may be too pedantic, 
I remember at least one less obvious situation like

padded_len = h->pass_len == 0 ? 16 : (h->pass_len+15) & ~0xf;
  

where padded_len is int and the field pass_len in struct rad_handle is 
size_t, which is long.

-- 
	Pappires

... Qui habet aurem audiat quid Spiritus dicat ecclesiis.


--------------090300090103020605000902
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Martin Husemann wrote:
<blockquote cite="mid20050220211813.GR12857@drowsy.duskware.de"
 type="cite">
  <pre wrap="">On Sun, Feb 20, 2005 at 05:45:34PM -0300, Paulo Alexandre Pinto Pires wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">&lt;&gt;I think lint was just doing its job, alerting about potential problems 
that could arise from accuracy lossage and possibly misaligned pointer 
casts/arithmetic, for pointed-to variables of different size.
    </pre>
  </blockquote>
</blockquote>
<p>I've looked at some of the errors, not all.&nbsp; While I agree that
complaining about constant arguments to vsnprintf() may be too
pedantic, I remember at least one less obvious situation like<br>
</p>
<blockquote>
  <pre>padded_len = h-&gt;pass_len == 0 ? 16 : (h-&gt;pass_len+15) &amp; ~0xf;
  </pre>
</blockquote>
<p>where padded_len is int and the field pass_len in struct rad_handle
is size_t, which is long.<br>
</p>
<pre class="moz-signature" cols="72">-- 
	Pappires

... Qui habet aurem audiat quid Spiritus dicat ecclesiis.
</pre>
</body>
</html>

--------------090300090103020605000902--