NULL pointer reference in fmt.c

Bill Gray bgray at marque.mu.edu
Tue May 3 07:30:55 AEST 1988


Oops!  A friend pointed out a bug in the version of fmt.c that I
posted to comp.sources.misc a week (or two) ago.  The same
problem is present in the version that was modified and posted to
unix-pc.sources.

------------------------------------------------------------------------
*** fmt.c.ORIG  Mon May  2 10:25:08 1988
--- fmt.c       Mon May  2 10:35:06 1988
***************
*** 92,98 ****
                                copyindent();
                        }
                        p = strtok(ilp, delimiters);
!                       while (*p) {
                                putword(p);
                                p = strtok(NULL, delimiters);
                        }
--- 92,98 ----
                                copyindent();
                        }
                        p = strtok(ilp, delimiters);
!                       while (p) {
                                putword(p);
                                p = strtok(NULL, delimiters);
                        }
------------------------------------------------------------------------

Bill Gray
--
bgray at marque.mu.edu    { uwvax | uunet }!marque.mu.edu!bgray



More information about the Comp.sources.bugs mailing list