On 6/21/07 11:26 AM, Marco Piovanelli said:
>> strcpy(p, path); //convert to Str255
>> buf[0] = strlen(p);
>
>This will fail rather horribly if path is longer than
>255 characters. Prefer strncpy() over strcpy(), and
>check string lengths.
And prefer strlcpy() over strncpy() over strcpy().
Oh how I wish the compiler would flag the use of these crappy functions...
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden