Re: ? printf Hex Escape Character Not Working
- From: "Victor Bazarov" <v.Abazarov@xxxxxxxxxxxx>
- Date: Thu, 3 Aug 2006 10:52:49 -0400
Alec S. wrote:
[..]
Who cares? I am allowed to put some code into the string literal,
for
whatever reason I please. The rules have to be for a 'char'
representation,
not just for elements of the character set.
Ah, I see. The problem is that, that is exactly what leads to
exploits! You put code in a string literal for "whatever reason"?
Hey, I am not going to look for a reason to put a code into a character
literal right now. My point is there may be one. We cannot limit the
language because you think there isn't any [reason for a code].
There are few reasons to do that and the _main_ (most common) one is
to inject exploit code into a buffer overflow.
What exploits are you talking about? I am talking about _source code_,
where I might want to have some hex code of arbitrary size to be placed
in the string for the reasons valid in my programming procedure.
Even if there was a
legitamate reason to do so, it would be bad coding practice. Don't
forget that the term "char" is short for "character" which means
exactly that: a character, a number, a letter, a math symbol, and so
on. There are other types for small data storage: byte,
What language are you talking about? 'Byte' in C++ _is_ 'char'.
short,
ushort?. Besides, with the push toward trusted computing (already
with DEP/NX), placing code into a string literal will eventually be
invalid.
Have you ever placed \0 in a string literal? That's the code I am
talking about, not *machine code*. Wake up!
[..]
There should at least be an option in the compiler to allow the
developer to choose the behavior of non-standard things.
Huh? You might want to contact Microsoft and suggest to them to add
yet another extension to the language. I am sure they won't mind. It
seems they thrive on non-standard stuff. <rant>Playing the authority
is what they get off on, methinks. But then again, every large company
is like that...</rant>
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
.
- References:
- Re: ? printf Hex Escape Character Not Working
- From: Tim Roberts
- Re: ? printf Hex Escape Character Not Working
- From: Victor Bazarov
- Re: ? printf Hex Escape Character Not Working
- From: Victor Bazarov
- Re: ? printf Hex Escape Character Not Working
- Prev by Date: Re: Declarative Recursion
- Next by Date: Re: Mutex wait order
- Previous by thread: Re: ? printf Hex Escape Character Not Working
- Next by thread: Re: ? printf Hex Escape Character Not Working
- Index(es):
Relevant Pages
|