From: joy merwin monteiro <joy.merwin@gmail.com>
To: Andriot <andriot@6wind.com>
Cc: linux-newbie@vger.kernel.org
Subject: Re: Printf and scanf
Date: Tue, 28 Jun 2005 09:12:58 +0530 [thread overview]
Message-ID: <4b0d6e0d050627204268dd1ea7@mail.gmail.com> (raw)
In-Reply-To: <20050627181103.ABFB324F@eagle.6wind.com>
Now you have piqued my interest.......
what special characters??
any place on the net I can read up on this?
Joy
On 6/27/05, Andriot <andriot@6wind.com> wrote:
> Hendrik Visage wrote:
>
> >On 6/5/05, Ankit Jain <ankitjain1580@yahoo.com> wrote:
> >
> >
> >
> >>i just want to know how scanf function can be used on
> >>the place of printf and vice versa
> >>
> >>
> >
> >In the Obfuscated C contest one of the first/early entries is one that
> >states "Using read to write" (Or something to similar extend, or
> >perhaps even using scanf to print). Reading that code is hackery, and
> >from my first glance at the code, it was don't with quote and macro
> >hackery.
> >
> >Thus you could #define scanf __prinf and #define printf __scanf... or
> >something with similar confusing
> >
> >
>
> Of course, it is not possible to use directly printf like a scanf ;)
> But you can use printf to write some values into arguments when you call
> the function. This uses special caracters you put in the format string.
> And this should prevent you to call printf with a string the user wrote,
> because this is a very big security hole.
>
> JP
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
--
<ed__> riel: if it were a vax, gcc would probably be an opcode
- excerpt from #kernelnewbies
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
prev parent reply other threads:[~2005-06-28 3:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-05 12:21 Printf and scanf Ankit Jain
2005-06-05 13:54 ` Arturas Moskvinas
2005-06-05 13:59 ` Steve Graegert
2005-06-24 21:20 ` Hendrik Visage
2005-06-27 18:11 ` Andriot
2005-06-28 3:42 ` joy merwin monteiro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b0d6e0d050627204268dd1ea7@mail.gmail.com \
--to=joy.merwin@gmail.com \
--cc=andriot@6wind.com \
--cc=joy_mm@ieee.org \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox