Well, I'll use the NSString and things like that it will be safer for sure but
I just wanted to see where the problem came from.
Anyway,thanks again for your help,
Paul
> Subject: Re: Problem mac os X version 10.6 when using sprinft
> From: alast...@alastairs-place.net
> Date: Mo
On 10 May 2010, at 16:54, paul morel wrote:
> Hi everybody,
> thanks a lot for your help.
> Actually you were right it size a problem of size. I increased the size and
> it works.
See, that worries me.
> The size was 20 because I thought that '\t' or other thing like that were
> considered d
On May 10, 2010, at 8:54 AM, paul morel wrote:
> But what is weird is that it seems that with Mac OS X 10.5 there is no
> problem, whereas when I use Mac OS 10.6 the problem occurs.
Buffer overflows can be sneaky. The effect depends on exactly how variables are
laid out in the stack (or if it’
bomber...@hotmail.com
> CC: fri...@manoverboard.org; cocoa-dev@lists.apple.com
> Subject: Re: Problem mac os X version 10.6 when using sprinft
> Date: Fri, 7 May 2010 19:27:57 -0400
>
> On Fri, 7 May 2010 21:50:46 +0100, Alastair Houghton said:
>
> >On 7 May 2010, at 21:16, S
On Fri, 7 May 2010 21:50:46 +0100, Alastair Houghton said:
>On 7 May 2010, at 21:16, Sean McBride wrote:
>
>> Also, you should never use sprintf. Use snprintf instead.
>
>snprintf() is safer, certainly, but "never" is a little strong for my
>taste. Like goto or longjmp(), it depends who is using
On 7 May 2010, at 21:16, Sean McBride wrote:
> Also, you should never use sprintf. Use snprintf instead.
snprintf() is safer, certainly, but "never" is a little strong for my taste.
Like goto or longjmp(), it depends who is using it and what for.
*Anyway*, this is cocoa-dev, and that being th
On Fri, 7 May 2010 15:03:31 -0500, Fritz Anderson said:
>On 7 May 2010, at 2:00 PM, paul morel wrote:
>
>> sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1,
>n1, n1);
>
>You should also bear in mind that the printf() family lets you
>parameterize widths and precisions dire
On 7 May 2010, at 2:00 PM, paul morel wrote:
> sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1,
> n1, n1);
You should also bear in mind that the printf() family lets you parameterize
widths and precisions directly by using "*" instead of a number, and supplying
the n
On May 7, 2010, at 11:59 AM, paul morel wrote:
> Hi,I'm trying to use a c function:
> sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1,
> n1, n1);
> When I compile my program for Mac OS X 10.5 and run the program everything is
> ok, whereas as soon as I use Mac OS X 10.6
On May 7, 2010, at 12:00 PM, paul morel wrote:
> sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1,
> n1, n1);
What’s the value of n1? How many bytes long is sFormat? Is the resulting string
going to overflow it? To paraphrase Kyle, the debugger is your friend.
—Jens_
On Fri, May 7, 2010 at 11:59 AM, paul morel wrote:
> Hi,I'm trying to use a c function:
> sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1,
> n1, n1);
> When I compile my program for Mac OS X 10.5 and run the program everything is
> ok, whereas as soon as I use Mac OS
Hi,I'm trying to use a c function:
sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1,
n1, n1);
When I compile my program for Mac OS X 10.5 and run the program everything is
ok, whereas as soon as I use Mac OS X 10.6 the program crashes at this
"sprintf" and there is a
Hi,I'm trying to use a c function:
sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1,
n1, n1);
When I compile my program for Mac OS X 10.5 and run the program everything is
ok, whereas as soon as I use Mac OS X 10.6 the program crashes at this
"sprintf" and there is a
Hi,I'm trying to use a c function:
sprintf(sFormat, "%%d\t%%0.%df\t%%0.%df\t%%0.%df\t%%0.%df\n", n1, n1,
n1, n1);
When I compile my program for Mac OS X 10.5 and run the program everything is
ok, whereas as soon as I use Mac OS X 10.6 the program crashes at this
"sprintf" and there is a
14 matches
Mail list logo