Settings

Theme

Xz.git: Fix Linux Landlock Feature Test in Autotools

git.tukaani.org

29 points by jamespwilliams 2 years ago · 6 comments

Reader

michelangelo 2 years ago

This is just spectacular. Evil, of course, but spectacular nevertheless.

  +        #include <sys/prctl.h>
  +. <<<<<<<<<<<<<<<<<<<<<<<< THIS IS IT
  +        void my_sandbox(void)
  +        {
  +
  • fargle 2 years ago

    why bother with a . instead of a &nbsp or some other unicode hackdodgery?

    • olliej 2 years ago

      A few reasons have been previously discussed: plenty of diff viewers highlight non-standard characters being a big one, the other bit being if someone does see this error it seems entirely plausible as a mistake.

      Choosing something atypical in a way that is clearly trying to be invisible rather than being an accident will draw a lot more attention than “oops I must have typo’d it”

atombender 2 years ago

Thread from yesterday (221 comments): https://news.ycombinator.com/item?id=39874404

jamespwilliamsOP 2 years ago

Can you spot the intentional bug in this commit?

  • JSDevOps 2 years ago

    It was checking if the C compiled to detect the landlock feature, and there was a single character in the middle of the code that made it always fail to compile and therefore silently leave the feature disabled.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection