public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, applied] RHBZ1944102 - self comparing ABI of protobuf-3.14.0-2.el9 failed
@ 2021-09-09 16:56 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2021-09-09 16:56 UTC (permalink / raw)
  To: libabigail

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(-)

diff --git a/src/abg-reader.cc b/src/abg-reader.cc
index 2331815e..7ee95c70 100644
--- a/src/abg-reader.cc
+++ b/src/abg-reader.cc
@@ -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;
-- 
2.30.0


-- 
		Dodji


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-09 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 16:56 [PATCH, applied] RHBZ1944102 - self comparing ABI of protobuf-3.14.0-2.el9 failed Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).