coding in c until my program is unsafe

preview_player
Показать описание
C Programming isn't all it's cracked up to be boys and girls.

IT TAKES GUTS. GRIT. DETERMINATION. SELF HATE. LUST?

🔥 SOCIALS 🔥

Рекомендации по теме
Комментарии
Автор

just saying "C" and "strings" in one sentence is enough to make me sweat

Requiem
Автор

"Read a string from the user"
"Make the code completely safe"
Ah yes, a classic impossible task

OrangeC
Автор

"there's gonna be 3 characters so gonna create 3 rooms for it"
null terminator: bonjor

vufmvbn
Автор

C assignment: "Read a string from the user"

Me, shouting at the screen: "IT'S A TRAP"

NewEnglandMovies
Автор

real c programmer:

There’s gonna be a string of length 5. I’m going to allocate 2000 bytes on the stack for this

ariss
Автор

Why the program was not safe:
1. He did not check if argc was equal to 0, 1, or any other number.
2. He did not terminate the program when outside of parameters e.g. if argc > 2, exit program.
3. He used strcpy, which is considered unsafe as it may be used in buffer overflow attacks. Use strncpy instead.
Probably missed something.

the_brutal_king
Автор

Don't forget to reference your dereference in the pointer to a pointer to determine the number of bits per byte in a parallel universe where we are glad that we have pass by reference.

jacobsoby
Автор

The moment you said “strings” is when I started laughing hysterically.

Nobody-mdkt
Автор

Programming in C is like holding a gun, except that it's legal in England.

pDaleC
Автор

"Take a string from the user"
*proceeds to NOT include <string.h>*

civetbutlemonbutmouse
Автор

funny watching him walk into a textbook buffer overflow attack

gabethedog
Автор

This program wasn't unsafe at this point, because without a semicolon it could not be compiled.

petros_adamopoulos
Автор

FYI: Nothing wrong with just looking at argv directly, you're only reading it after all so copying it to a buffer on the stack is a waste (and more ways your program can go wrong).

tenv
Автор

"there is a string"
"i should make a buffer 63352482 times larger than the string just in case"

ImXyper
Автор

the most terrifying thing I ever did in a computer science course was to feed a C program unsafe strings to execute arbitrary code. wild shit

thanguy
Автор

*Lost children will be taught the C programming language.*

_GhostMiner
Автор

The most unsafe thing in this video is that monitor placement

calle
Автор

Im grateful that people out there have coded things in c, that we web developers take for granted..
Thank you C lords

AFvids
Автор

C is that one friend you once had great memories with but you're happy not being with now

ultimateloser
Автор

C programmers never die they just cast into void

Fortexik