[applied] RHBZ1944102 - self comparing ABI of protobuf-3.14.0-2.el9 failed
Commit Message
Hello,
Reading size and alignment from abixml can lead to loss of precision
that surfaced when self comparing the protobuf package as described in
bug https://bugzilla.redhat.com/show_bug.cgi?id=1944102.
Fixed thus.
* src/abg-reader.cc (read_size_and_alignment): Use atoll to read
long long values, not atoi.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
src/abg-reader.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -2481,13 +2481,13 @@ read_size_and_alignment(xmlNodePtr node,
bool got_something = false;
if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(node, "size-in-bits"))
{
- size_in_bits = atoi(CHAR_STR(s));
+ size_in_bits = atoll(CHAR_STR(s));
got_something = true;
}
if (xml_char_sptr s = XML_NODE_GET_ATTRIBUTE(node, "alignment-in-bits"))
{
- align_in_bits = atoi(CHAR_STR(s));
+ align_in_bits = atoll(CHAR_STR(s));
got_something = true;
}
return got_something;