• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: unsafe printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unsafe printing


  • Subject: Re: unsafe printing
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 13 Jul 2015 14:56:17 -0500


On Fri, Jul 10, 2015, at 02:57 PM, Jan E. Schotsman wrote:
> Hello,
>
> How can I get rid of warnings about unsafe use of printf?
>
> char myString[256];
>
> // set myString in some untransparent way
>
> printf( myString );  // warning: format string is not a literal
> (potentially insecure)

Use printf("%s", myString).

--Kyle Sluder

>
> Xcode 6.3
>
> TIA,
>
> Jan E.
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >unsafe printing (From: "Jan E. Schotsman" <email@hidden>)

  • Prev by Date: Re: Patching Watchkit App's info.plist at build time.
  • Next by Date: Project is "not buildable"
  • Previous by thread: unsafe printing
  • Next by thread: Re: unsafe printing
  • Index(es):
    • Date
    • Thread