If the previous patch for strtoi_c() is accepted, then this
can be fixed in routine version_compare() located in file
filter.cpp
This allows version_compare() to reject large values such
as 123456789
the diff file is based on today's CVS (May 17,2005)
----suggested update (filter.cpp)-------
static PosibErr<int> version_compare(const char * x,
const char * y)
{
do {
int xn = 0, yn = 0;
if (*x) {
if (!asc_isdigit(*x) || ((xn = strtoi_c(x, &x)) < 0))
return make_err(bad_version_string);
}
if (*y) {
if (!asc_isdigit(*y) || ((yn = strtoi_c(y, &y)) < 0))
return make_err(bad_version_string);
}
int diff = xn - yn;
if (diff != 0) return diff;
if (*x) {
if (*x != '.') return make_err(bad_version_string);
++x;}
if (*y) {
if (*y != '.') return make_err(bad_version_string);
++y;}
} while (*x || *y);
return 0;
}
patch to allow testing for large numbers
This issue has moved to GitHub: https://github.com/GNUAspell/aspell/issues/291