Re: Minor net/core/sock.c security issue?

David S. Miller (davem@redhat.com)
Fri, 27 Jul 2001 02:56:35 -0700 (PDT)


Alexey Kuznetsov writes:
> > 1) have standard inline functions with names that suggest the
> > signedness, much like Rusty's netfilter macros.
>
> min/max are macros. I do not know how to make a valid inline
> for it: cast to long has problems with unsigned longs, cast to unsigned long
> have the same problems with signedness.

For the time being I've just killed that bogus min define
from sock.c and also open-coded the min/max usage in the
rest of sock.c

This solves the original report, but later I'd like to do
something more satisfactory here.

I mean, grep for "define [min|max]" in just the networking
sources right now, yuck!

Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/