Skip to content

Commit 13034e5

Browse files
committed
* src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
1 parent 4738dcc commit 13034e5

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2018-08-26 Werner Lemberg <wl@gnu.org>
2+
3+
* src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
4+
5+
Reported as
6+
7+
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
8+
19
2018-08-26 Werner Lemberg <wl@gnu.org>
210

311
Minor tracing adjustments.

src/pshinter/pshalgo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
psh_hint_overlap( PSH_Hint hint1,
5454
PSH_Hint hint2 )
5555
{
56-
return hint1->org_pos + hint1->org_len >= hint2->org_pos &&
57-
hint2->org_pos + hint2->org_len >= hint1->org_pos;
56+
return ADD_INT( hint1->org_pos, hint1->org_len ) >= hint2->org_pos &&
57+
ADD_INT( hint2->org_pos, hint2->org_len ) >= hint1->org_pos;
5858
}
5959

6060

0 commit comments

Comments
 (0)