Reply to post: Re: *Why* does this work?

Trojan Source attack: Code that says one thing to humans tells your compiler something very different, warn academics

Anonymous Coward
Anonymous Coward

Re: *Why* does this work?

It works because the code editor is buggy and displays something different to what is actually there i.e. what the programmer sees is not what the compiler sees.

The cause of the behaviour is probably because it is using a standard text editing class and this bit of the behaviour is designed for a word processor and it hasn't been blocked or modified.

An analogy might be if a code editor were to allow white-on-white formatting, like a word processor, and that were used to sneak code into a program in the guise of a few blank lines.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon