lkml.org 
[lkml]   [2000]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 2.2.x BUG & PATCH: recvmsg() does not check msg_controllen correctly
From
Date
"David S. Miller" <davem@redhat.com> writes:

> From: Philippe Troin <phil@fifi.org>
> Date: 03 Nov 2000 19:53:04 -0800
>
> Yes I agree, mixing signed and unsigned arithmetic is evil... Doesn't
> gcc have a flag for unsafe signed/unsigned mixtures ?
>
> Would you consider this patch (or a variant) for inclusion ?
>
> I would accept a patch which made the code set fdmax <= 0 when
> (msg->msg_controllen < (sizeof(struct cmsghdr) + sizeof(int)))
> because it is the sole reason this bug exists at all.

How about this one ?

Phil.
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.102 / U:23.544 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site