cp-demangle.c (d_number): Avoid signed int overflow.
2019-10-29 Paul Pluzhnikov <ppluzhnikov@google.com> * cp-demangle.c (d_number): Avoid signed int overflow. From-SVN: r277575
This commit is contained in:
parent
fd46280df1
commit
1c40e11956
|
@ -1,3 +1,7 @@
|
|||
2019-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
|
||||
* cp-demangle.c (d_number): Avoid signed int overflow.
|
||||
|
||||
2019-10-28 Miguel Saldivar <saldivarcher@gmail.com>
|
||||
|
||||
* cp-demangle.c (d_print_mod): Add a space before printing `complex`
|
||||
|
|
|
@ -1717,7 +1717,7 @@ d_number (struct d_info *di)
|
|||
}
|
||||
if (ret > ((INT_MAX - (peek - '0')) / 10))
|
||||
return -1;
|
||||
ret = ret * 10 + peek - '0';
|
||||
ret = ret * 10 + (peek - '0');
|
||||
d_advance (di, 1);
|
||||
peek = d_peek_char (di);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue