* src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.

Reported as

  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
This commit is contained in:
Werner Lemberg 2018-08-26 12:22:51 +02:00
parent 4738dcc4df
commit 13034e54aa
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2018-08-26 Werner Lemberg <wl@gnu.org>
* src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
2018-08-26 Werner Lemberg <wl@gnu.org>
Minor tracing adjustments.

View File

@ -53,8 +53,8 @@
psh_hint_overlap( PSH_Hint hint1,
PSH_Hint hint2 )
{
return hint1->org_pos + hint1->org_len >= hint2->org_pos &&
hint2->org_pos + hint2->org_len >= hint1->org_pos;
return ADD_INT( hint1->org_pos, hint1->org_len ) >= hint2->org_pos &&
ADD_INT( hint2->org_pos, hint2->org_len ) >= hint1->org_pos;
}