Re: ? printf Hex Escape Character Not Working

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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


.



Relevant Pages

  • Re: First Look At Anne Hathaway As Catwoman
    ... Casting is part of the character in an adaptation, live or animated, ... things for no reason and I see a reason, I'm going to point out the ... can't admit that there significant changes being made to the DCU, ... the comics, however, most definitely is a reboot as they making major ...
    (rec.arts.comics.dc.universe)
  • Re: Not a lot of success with the latest villains
    ... said Cassandra was Xavier's twin who he murdered in the womb. ... He *has* reason to hate ... A character being introduced into all that drama? ... so if he was always meant to be Magneto than Morrison ...
    (rec.arts.comics.marvel.xbooks)
  • Re: The Literary Calvinist Meets the Arminian Terror
    ... character I've ever tried to write) arrives home and one of the things ... If they behave in a way I disagree with, they need a reason. ... Villain is a bit mild a word for my evil overlords and ladies. ... femme fatale and watch him try to resist her gravitational pull. ...
    (rec.arts.sf.composition)
  • Review - The Doctors Daugter
    ... I was going to send this last night, but for some reason Google kept ... And the episode succeeds in providing the right ... reaction and never really developed into a character. ... Donna's shaping up to be a better companion than I ...
    (rec.arts.drwho)
  • Re: Will Someone PLEASE pick up Dr Who?
    ... > saying "his character changes during regenerations, ... > reasonably be their (Eccleston and Piper's) cops? ... > the reason the thread was started. ... > that can be used to explain away inconsistencies, ...
    (rec.arts.drwho)