[pcre-dev] Reliance on undefined shift overflow

Αρχική Σελίδα
Delete this message
Συντάκτης: Michael McConville
Ημερομηνία: 2016-02-27 00:24 -000
Προς: pcre-dev
Αντικείμενο: [pcre-dev] Reliance on undefined shift overflow
The expression (1 << (c&7)) is used as a boolean in:

pcre,    pcre_study:1374
pcre2,    src/pcre2_study.c:1455


This is technically a constant true value, as the only potential
outcomes are:

* no overflow
* undefined overflow

Nonetheless, considering the '&7' part, overflow is impossible.

Thanks for your time,
Michael