


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



























int total = 0, i; for (i=0; i<n; i++) total += *(a[i]); return total;
Proving Precondition→Postcondition
Proving Precondition→Postcondition
Non-Language-Specific Vulnerabilities
int openfile(char *path) { struct stat s; if (stat(path, &s) < 0) return -1; if (!S_ISRREG(s.st_mode)) { error("only regular files allowed!"); return -1; } return open(path, O_RDONLY); }