[haiku-commits] Re: haiku: hrev43337 - in src/add-ons/translators: ppm gif wonderbrush stxt shared

  • From: marcus overhagen <marcusoverhagen@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 27 Nov 2011 08:43:13 +0100

> Prevent string overflow by replacing usage of strcpy by strncpy
>
> CID 8951, CID 10733, CID 10734, CID 10735, CID 10736, CID 10737, CID 10738,
> CID 10739

Good idea, but please don't use strncpy, as it won't append the null
termination character in the overflow case. Use strlcpy, strlcat,
snprintf, strnlen for save string operations.

regards
Marcus

Other related posts: