logo

Vulnerabilities of the gets function in C

#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char* argv[]) { char str[10]; int v = 0; gets(str); printf("You typed: %s\n", str); printf("v: %d | %x\n", v, v); return 0; }
Course thumb

The C programming language made simple