1

I have been given a C program with about 20.000 calls to the library function strcpy. In the program, the type of the first argument (the destination buffer) passed to strcpy is declared sometimes as a (char *), sometimes as a char[]. Actually my job is to find all occurrences of the strcpy() where the first argument is declared as a pointer to char (and then return the result of the search to my supervisor, for example, as a list [filename; line number]). Obviously I could accomplish this job by examining every single call to strcpy by eye, but it could take a whole week. Since I cannot afford this I would be grateful if someone knows a way to automize this search (a tool or even a programming trick). Thanks to all in advance.

bandolero
  • 21
  • 1

0 Answers0