public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applied] RHBZ1944102 - self comparing ABI of protobuf-3.14.0-2.el9 failed
Date: Thu, 09 Sep 2021 18:56:18 +0200	[thread overview]
Message-ID: <87tuitelhp.fsf@redhat.com> (raw)

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


                 reply	other threads:[~2021-09-09 16:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuitelhp.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).