Michael,

Not a bad idea--infact, an excellent idea; but names are defined to be no larger
than, say, 16 characters as-is, so I figured 'why bother'.  'why bother' can get
me into trouble, though; and changing to strncpy would cost me 5 minutes and
(potentially)
save me hours in the future.

Thanks for the advice.  Also, thanks to everyone else as well.  I muchly
appreciate the assistance.

Jeremy

----- Original Message -----
From: "Michael Barton" <[EMAIL PROTECTED]>
To: "Jeremy Hill" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Thursday, August 29, 2002 10:29 PM
Subject: Re: Question about memory, detailed


> > Based on what Dale said, since memory is never allocated, I guess there's
> no
> > problem.  I certainly don't allocate any and fread_word appears not to.
>
> Right.
>
> I would personally make that:
>         strncpy (bfield_data.best_ratio.name, tmp,
>            sizeof(bfield_data.best_ratio));
>
> So you know you'll never write past the buffer.
>
> --Palrich.
>
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom


Reply via email to