From: Chris B. <buc...@us...> - 2010-11-29 20:16:03
|
Update of /cvsroot/sblim/sfcb In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19030 Modified Files: mofpp.c ChangeLog NEWS Log Message: Undo 3054618 fix; not ready for release Index: mofpp.c =================================================================== RCS file: /cvsroot/sblim/sfcb/mofpp.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- mofpp.c 18 Nov 2010 23:14:30 -0000 1.7 +++ mofpp.c 29 Nov 2010 20:15:54 -0000 1.8 @@ -70,11 +70,10 @@ void processFile(char *fn, FILE *in, FILE *out) { - char *s,*e,*es,rec[10000],*ifn=NULL; + char *s,*e,rec[10000],*ifn=NULL; FILE *incFile; int comment=0; int nl=0; - int qs=0; while (fgets(rec, sizeof(rec), in)) { nl++; @@ -109,42 +108,28 @@ } } - while ((*s == ' ') || (*s == '\t')) { - s++; - } - es = s; - qs = 0; - if (*s == '"') { - qs = 1; - /* find end of the string */ - es++; - while ((s = strstr(es, "\""))) { - es = s+1; /* end of quoted string */ - } - } - - while ((s = strstr(es, "/"))) { - if (*(s+1) == '/') { - if ((e = strstr(s+2,"\r\n"))) { - strcpy(s,e+2); - } else if ((e = strstr(s+2,"\n"))) { - strcpy(s,e+qs); - } else { - *s = 0; - comment = 1; - break; - } - } else if (*(s+1) == '*') { - if ((e = strstr(s+2,"*/"))) { - strcpy(s,e+2); - } else { - *s = 0; - comment = 2; - break; - } - } else { - s++; - } + while ((s = strstr(s,"/"))) { + if (*(s+1) == '/') { + if ((e = strstr(s+2,"\r\n"))) { + strcpy(s,e+2); + } else if ((e = strstr(s+2,"\n"))) { + strcpy(s,e+1); + } else { + *s = 0; + comment = 1; + break; + } + } else if (*(s+1) == '*') { + if ((e = strstr(s+2,"*/"))) { + strcpy(s,e+2); + } else { + *s = 0; + comment = 2; + break; + } + } else { + s++; + } } fprintf(out,"%s",rec); Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.564 retrieving revision 1.565 diff -u -d -r1.564 -r1.565 --- NEWS 18 Nov 2010 23:14:30 -0000 1.564 +++ NEWS 29 Nov 2010 20:15:54 -0000 1.565 @@ -11,7 +11,6 @@ - 3097310 localConnect in cimcClientSfcbLocal.c accesses free'd memory - 3087577 Provider MI accessed before finished initializing - 3109469 Potential Buffer Overflow in msgqueue.c:localConnectServer() -- 3054618 mofpp is overaggressive when detecting comments Changes in 1.3.9 ================ Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.637 retrieving revision 1.638 diff -u -d -r1.637 -r1.638 --- ChangeLog 18 Nov 2010 23:14:30 -0000 1.637 +++ ChangeLog 29 Nov 2010 20:15:54 -0000 1.638 @@ -1,8 +1,3 @@ -2010-11-18 Chris Buccella <buc...@li...> - - * mofpp.c: - [ 3054618 ] mofpp is overaggressive when detecting comments - 2010-11-17 Chris Buccella <buc...@li...> * msgqueue.c: |