• 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: I confirmed ONE problem - not sure how to fix it though.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I confirmed ONE problem - not sure how to fix it though.


  • Subject: Re: I confirmed ONE problem - not sure how to fix it though.
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 5 Apr 2006 10:48:19 -0400
  • Organization: Rogue Research

On 2006-04-05 01:15, John Draper said:

>  void
>infoServer::setExtIP(char *ip)
>{
>    if (m_MyExtIP == NULL) {
>        m_MyExtIP = new char(100);
>    }
>    strcpy(m_MyExtIP, ip);     <---- This causes the crash.  The size of
>the string is 16 bytes
>}

In addition to what others have said, I would recommend you never never
never use strcpy(), use strncpy() instead, it takes a length parameter.
Though it may not have helped you here, it is good practice.  You will
be less likely to have buffer overruns.

--
____________________________________________________________
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.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: I confirmed ONE problem - not sure how to fix it though.
      • From: Prachi Gauriar <email@hidden>
References: 
 >I confirmed ONE problem - not sure how to fix it though. (From: John Draper <email@hidden>)

  • Prev by Date: DWARF debug info is great
  • Next by Date: Re: DWARF debug info is great
  • Previous by thread: Re: I confirmed ONE problem - not sure how to fix it though.
  • Next by thread: Re: I confirmed ONE problem - not sure how to fix it though.
  • Index(es):
    • Date
    • Thread