Mercurial > hg
diff mercurial/base85.c @ 24879:b3142ea2a0d4 stable
parsers: avoid signed integer overflow in calculation of leaf-node index
If v = -INT_MAX - 1, -v would exceed INT_MAX. I don't think this would cause
problems such as issue4627, but we can't blame it as a compiler bug because
signed integer overflow is undefined in C.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 29 Apr 2015 23:07:34 +0900 |
parents | 19a915d43a68 |
children | c1aefe57cf4e |