Skip to content

Commit

Permalink
fix numeric overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Nov 27, 2024
1 parent 60810db commit c13dc92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions h323util.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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++];
Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Version number for GnuGk
//
// Copyright (c) 2002, Dr.-Ing. Martin Froehlich <[email protected]>
// 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.
Expand Down

0 comments on commit c13dc92

Please sign in to comment.