[SDL] Re: How do I get SDL_TTF to print out numbers?

Petri Latvala adrinael at nuclearzone.org
Mon Mar 28 13:39:36 PST 2005

On Mon, Mar 28, 2005 at 11:08:15AM -0500, Wes Wannemacher wrote:
> int
> main(int argc, char ** argv)
> {
>     char name[40];
>     printf("enter your name: ");
>     scanf("%s", &name);
>     printf("your name is: %s\n", name);
>     return 0;
> }
> I've heard that if you pass format characters through the prompt you
> can potentially gain access to other information in the stack.

Yes, if you use printf this way:


Then name can contain format characters, and they will be parsed and
stack will be read.

Petri Latvala
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050329/9f28b2df/attachment-0008.pgp>

More information about the SDL mailing list