Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] idmap: use UL for bitshift literals
Date: Wed, 05 Mar 2014 08:52:34 -0600	[thread overview]
Message-ID: <53173A32.4020109@gmail.com> (raw)
In-Reply-To: <1393977694-18423-1-git-send-email-espy@canonical.com>

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

Hi Tony,

On 03/04/2014 06:01 PM, Tony Espy wrote:
> The current bitshift logic in idmap incorrectly uses
> the literal 1 for the value to shift in idmap_alloc(),
> idmap_take(), and idmap_alloc_next().  This causes the
> resulting value to be an int instead of a long, which
> results in the wrong bit being set once the number of
> bits to shift operand exceeds sizeof(int).  Also
> on some platforms, the behavior of the left bitshift
> operator is undefined when this overflow occurs.
> ---
>   src/idmap.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>

Good catch.  Patch has been applied, thanks.

Regards,
-Denis


  reply	other threads:[~2014-03-05 14:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  0:01 [PATCH] idmap: use UL for bitshift literals Tony Espy
2014-03-05 14:52 ` Denis Kenzior [this message]
2014-03-05 21:43   ` Tony Espy
2014-03-05 21:44     ` Denis Kenzior

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=53173A32.4020109@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.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