Re: [bug report] lib/lzo: implement run-length encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/12/2018 2:53 pm, Dan Carpenter wrote:
> Hello Dave Rodgman,
> The patch 50c4c616ec52: "lib/lzo: implement run-length encoding" from
> Nov 30, 2018, leads to the following static checker warning:
>
> lib/lzo/lzo1x_compress.c:164 lzo1x_1_do_compress()
> error: uninitialized symbol 'm_pos'.
>
> lib/lzo/lzo1x_compress.c
>     100                                  ir++;
>     101                          run_length = ir - ip;
>     102                          if (run_length > MAX_ZERO_RUN_LENGTH)
>     103                                  run_length = MAX_ZERO_RUN_LENGTH;
>     104                  } else {
>     105                          t = ((dv * 0x1824429d) >> (32 - D_BITS)) & D_MASK;
>     106                          m_pos = in + dict[t];
>                                  ^^^^^^^^^^^^^^^^^^^^^
> We only initialize m_pos on the else path now.
>     161  #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && defined(LZO_USE_CTZ64)
>     162                  u64 v;
>     163                  v = get_unaligned((const u64 *) (ip + m_len)) ^
>     164                      get_unaligned((const u64 *) (m_pos + m_len));
>                                                           ^^^^^^^^^^^^^
> Smatch complains here.

Thanks, this was fixed in the latest version of this patchset:

https://lkml.org/lkml/2018/11/30/972

Dave

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux