This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]


This crashed on PowerPC64 running cc1 --help.

ChangeLog:

2003-12-12  Segher Boessenkool  <boessen@de.ibm.com>

      * opts.c (wrap_help): Fix overflow.



*** opts.c~ 2003-12-12 17:48:13.000000000 +0100
--- opts.c  2003-12-12 17:48:33.000000000 +0100
*************** wrap_help (const char *help, const char
*** 1829,1835 ****
            len = i;
            else if ((help[i] == '-' || help[i] == '/')
                   && help[i + 1] != ' '
!                  && ISALPHA (help[i - 1]))
            len = i + 1;
          }
      }
--- 1829,1835 ----
            len = i;
            else if ((help[i] == '-' || help[i] == '/')
                   && help[i + 1] != ' '
!                  && i > 0 && ISALPHA (help[i - 1]))
            len = i + 1;
          }
      }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]