Re: RFFR

spacewalker <[email protected]>
Newsgroups gmane.comp.security.libnet
Organization 0xbadc0de (inc)
Message-ID <[email protected]>
Note that on sparc processors, packed structures are a problem. I
remember a long time ago having a program crashing using pcap or libnet
code (i don't remember which the problem was from). 
the problem lied in a "long" nonaligned to 4 bytes, placed in a
structure, and then deferenced. I believed it to be a compiler problem
(which should detect nonaligned access).

hope this will help
On Thu, 22 Jan 2004 13:18:13 +0100
"Alfredo Andres Omella" <[email protected]> wrote:

> 
> IMHO is very important to fix data structures not aligned in memory.
> 
> On Solaris8 SPARC an Linux RedHat 7.2 (2.4.7-10) "sizeof(struct
> libnet_stp_conf_hdr)" is 40 bytes and must be 35 bytes.
> 
> Fortunately libnet_stp_conf_hdr is not used within the libnet code but
> is susceptible to be used by users (hope nobody do it) :).
> 
> Do you think is really necessary (the structure, i mean)? :?
> 
> If you prefere to keep up with the structure one solution could be to
> use"__attribute__((packed))" but this would face 2 problems:
> a) Any user will be forced to use gcc (some people use the Sun
> compiler, not compatible with "attribute" extensions.)
> b) Packing structures will penalize the libnet performance.
> 
> 
> Waiting for answers...
> 
> 
> Alfredo
> 
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.