Vulnerabilities in languages (mostly C/C++)
// Correct usage
printf("%d\n", *value);
// Reading memory after the variable
printf("%d\n", *(value + 4));
// Reading memory before the variable
printf("%d\n", *(value - 4));int value = 42;
// Correct usage
printf("%d\n", value);
// Cast to variable with different storage
printf("%f\n", *((double*) &value));
// Cast to variable with different size
printf("%llu\n", *((unsigned long long*) &value));Last updated