diff --git a/changes.txt b/changes.txt index d97d445b..1770f581 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ Changes from 5.13 to 5.14 ========================= +- BUGFIX(h323utils.cxx) fix numeric overflow - BUGFIX(Toolkit.cxx) fix iterator usage (found by Coverity) Changes from 5.12 to 5.13 diff --git a/h323util.cxx b/h323util.cxx index 64c633c9..abd12a11 100644 --- a/h323util.cxx +++ b/h323util.cxx @@ -2,7 +2,7 @@ // // H.323 utility functions // -// Copyright (c) 2000-2023, Jan Willamowius +// Copyright (c) 2000-2024, Jan Willamowius // // This work is published under the GNU Public License version 2 (GPLv2) // see file COPYING for details. @@ -958,8 +958,8 @@ PString RewriteString( PTRACE(1, "GK\tInvalid rewrite rule (dots do not match) - " << prefix << " = " << value); break; } - int dotDstOffset = (long)lastDstDot - (long)value; - int dotSrcOffset = (long)lastSrcDot - (long)prefix; + int dotDstOffset = long(lastDstDot - value); + int dotSrcOffset = long(lastSrcDot - prefix); while (*lastDstDot++ == '.' && *lastSrcDot++ == '.') { if (postdialmatch) { postdialdigits += s[dotSrcOffset++]; diff --git a/version.h b/version.h index 67cc6bb1..a22face5 100644 --- a/version.h +++ b/version.h @@ -3,7 +3,7 @@ // Version number for GnuGk // // Copyright (c) 2002, Dr.-Ing. Martin Froehlich -// Copyright (c) 2006-2023, Jan Willamowius +// Copyright (c) 2006-2024, Jan Willamowius // // This work is published under the GNU Public License version 2 (GPLv2) // see file COPYING for details.