[prev in list] [next in list] [prev in thread] [next in thread]
List: lustre-devel
Subject: Re: [Lustre-devel] Re: [Lustre-cvs] b_devel: lustre/lib client.c target.c
From: Phil Schwan <phil () clusterfs ! com>
Date: 2003-04-24 6:10:01
[Download RAW message or body]
On Apr 23, Andreas Dilger wrote:
> On Apr 23, 2003 22:02 -0700, Phil Schwan wrote:
> > @@ -110,7 +109,7 @@ int target_handle_connect(struct ptlrpc_
> > /* XXX extract a nettype and format accordingly */
> > - snprintf(remote_uuid.uuid, sizeof remote_uuid.uuid,
> > + snprintf(remote_uuid.uuid, sizeof remote_uuid,
> > "NET_"LPX64"_UUID", req->rq_peer.peer_nid);
>
> I'm not sure I agree with this. If a UUID eventually is changed to, say,
> a binary blob + a string name (discussed at times in the past), the above
> will potentially overflow the .uuid part of the struct.
The whole _point_ of this uuid struct was to avoid having people do
sizeof on the array portion, which has been the source of frustrating
bugs more than a few times.
Nobody--well, at least not I--can keep the rules for sizeof __u8[37]
straight. Sometimes we got 37, sometimes we got 1, frustration
ensued, and a structure was the result.
-Phil
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Lustre-devel mailing list
Lustre-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lustre-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic