Mercurial > hg
comparison mercurial/strutil.py @ 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 | 25e572394f5c |
children | b723f05ec49b |
comparison
equal
deleted
inserted
replaced
24878:e530cde6d115 | 24879:b3142ea2a0d4 |
---|