Out-of-bound bug fix in common/config.cpp
"Doug Kwan (關振德)" <[email protected]> Thu, 9 Aug 2007 00:40:29 -0700
| Newsgroups | gmane.comp.gnu.aspell.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi
This is a small patch for a bug caught by gcc-4.2.1. The original
code references the address right before a string literal. I believe
my fix is the right thing to do. :) Could someone confirm that this is
okay?
-Doug
===================================================
--- config.cpp.orig 2007-08-09 00:35:48.000000000 -0700
+++ config.cpp 2007-08-09 00:36:04.000000000 -0700
@@ -1122,7 +1122,7 @@
: out(o), first(false)
{
first_prefix = _("# default: ");
- num_blanks = strlen(first_prefix - 1);
+ num_blanks = strlen(first_prefix) - 1;
}
PosibErr<bool> ListDefaultDump::add(ParmStr d)