








































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!









































Tracking execution states is a helpful addition to
the methodologies described.
Requirements definition.
Desk checking.
Following and reverse engineering the
programmers logic and often, making educated
guesses about the programmer‟s style of thinking.
char buf[1024];
…
strcpy(buf, “user entered: “);
strncat(buf, user_data, sizeof(buf));
…
char buf[1024];
…
strcpy(buf, “user entered: “);
strncat(buf, user_data, sizeof(buf) – strlen(buf));
…
Looping Constructs.
Miscalculations.
Off-by one errors.
while (cp < reqend && isspace(*cp)) cp++; if (cp == reqend || cp == ',') { buf[0] = '\0'; data = buf; if (cp < reqend) cp++; reqpt = cp; return v;} if (cp == '=') { cp++; tp = buf; while (cp < reqend && isspace(cp)) cp++; while (cp < reqend && *cp != ',') *tp++ = *cp++; // here is the problem if (cp < reqend) cp++; tp = '\0'; while (isspace((tp-1))) *(--tp) = '\0'; reqpt = cp; *data = buf; return v; }