This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 7/7] Fix invalid left shift of negative value.


On Fri, Oct 30, 2015 at 03:45:06PM +0100, Dominik Vogt wrote:
> On Fri, Oct 30, 2015 at 03:38:15PM +0100, Dominik Vogt wrote:
> > The following series of patches fixes all occurences of
> > left-shifting negative constants in C code which is undefined by
> > the C standard.  The patches have been tested on s390x, covering
> > only a small subset of the changes.
> 
> Changes in zlib/.  This is only one change in a source code
> comment.

Any optinions on this patch?

> >From d5fa58a46d83819611e199cb339fd94913f741b8 Mon Sep 17 00:00:00 2001
> From: Dominik Vogt <vogt@linux.vnet.ibm.com>
> Date: Fri, 30 Oct 2015 15:20:03 +0100
> Subject: [PATCH 7/7] zlib: Fix left shift of negative value.
> 
> (Updated just a comment; no code changed)
> ---
>  zlib/zlib.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/zlib/zlib.h b/zlib/zlib.h
> index 3edf3ac..b524487 100644
> --- a/zlib/zlib.h
> +++ b/zlib/zlib.h
> @@ -941,7 +941,7 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
>     location in the input stream can be determined from avail_in and data_type
>     as noted in the description for the Z_BLOCK flush parameter for inflate.
>  
> -     inflateMark returns the value noted above or -1 << 16 if the provided
> +     inflateMark returns the value noted above or -(1 << 16) if the provided
>     source stream state was inconsistent.
>  */
>  
> -- 
> 2.3.0
> 



Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]