r/ProgrammerHumor 1d ago

Meme iReplacedItWithABuiltinFunction

Post image
3.2k Upvotes

51 comments sorted by

View all comments

106

u/evilwizzardofcoding 1d ago

People laugh at this, but remember, someone caught a malicious PR to CURL during optimization 'cus the malicious code made a function take longer than it should.

60

u/Bright-Historian-216 1d ago

to curl? i've heard about xz-lib (i think it was xz-lib?), but not to curl. can you link that?

40

u/evilwizzardofcoding 1d ago

Oh you right, it was XZ. The curl one was a hypothetical, someone pointed out there was a way you could do some unicode wizardry to make a specific line vulnerable without it being really noticeable, but it was just a concept, no one tried to push it to the actual repo.

31

u/Complete_Window4856 1d ago

The spotter dude is a postgres contributor. For DB level a 100ms difference constantly is horrenduously big.

The curl one aint it the apex of the ai slop PRs in repo that made the only maintainer to force a "no ai PR" policy? He was being bombarded with convincing PRs, except they evoke code from heavens that never existed and assumes there were flaws

7

u/danielv123 22h ago

For a DB sure, but afaik what he measured was that establishing his ssh connection took 100ms longer or something. I would have just assumed my network was weird or something.