> -----Original Message-----
> From: Joshua Daniel Franklin [mailto:[EMAIL PROTECTED]] 

It's not - strace is manually entered version info. 
 
> Anyway here is a patch for cygcheck that I think does the 
> right thing. Somebody want to take a look?

+const char *revision="$Revision: 1.22 $";

This is suspect: The revision string can look like $Revision:$ in some circumstances - 
see man co again - which is why I had "$Revision: $ " - note the space after the 
second $ sign.

Likewise, the 
+  /* Get version number out of the autogenerated revision string  */
+  (void *) version = malloc(sizeof(revision));
+  strcpy(version, revision+11);
+  version[strlen(version)-1]= 0;

Could be more robustly done as 
+  version = (char *) malloc(sizeof(revision));
+  strcpy(version, revision+11);
+  {
+    char *temp=version + strlen (version);
+    while (isspace(--temp) && temp >= version);
+    temp[1]='\0';
+  }

Which will munch an arbitrary amount of whitespace.

Rob

Reply via email to