* [bug report] lib: update LZ4 compressor module
@ 2017-01-31 10:41 Dan Carpenter
2017-01-31 10:43 ` Dan Carpenter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-01-31 10:41 UTC (permalink / raw)
To: kernel-janitors
Hello Sven Schmidt,
This is a semi-automatic email about new static checker warnings.
The patch e355e356f87b: "lib: update LZ4 compressor module" from Jan
25, 2017, leads to the following Smatch complaint:
lib/lz4/lz4_compress.c:890 lz4_compress()
warn: variable dereferenced before check 'dst_len' (see line 880)
lib/lz4/lz4_compress.c
879 size_t *dst_len, void *wrkmem) {
880 *dst_len = LZ4_compress_default(src, dst, (int)src_len,
^^^^^^^
Dereference.
881 (int)((size_t)dst_len), wrkmem);
882
883 /*
884 * Prior lz4_compress will return -1 in case of error
885 * and 0 on success
886 * while new LZ4_compress_fast/default
887 * returns 0 in case of error
888 * and the output length on success
889 */
890 if (!dst_len)
^^^^^^^
Checked too late. Can this test just be deleted?
891 return -1;
892 else
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] lib: update LZ4 compressor module
2017-01-31 10:41 [bug report] lib: update LZ4 compressor module Dan Carpenter
@ 2017-01-31 10:43 ` Dan Carpenter
2017-01-31 12:09 ` Sven Schmidt (4sschmid)
2017-01-31 16:36 ` Dan Carpenter
2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-01-31 10:43 UTC (permalink / raw)
To: kernel-janitors
Same thing for lz4hc_compress() as well.
lib/lz4/lz4hc_compress.c:622 lz4hc_compress()
warn: variable dereferenced before check 'dst_len' (see line 612)
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] lib: update LZ4 compressor module
2017-01-31 10:41 [bug report] lib: update LZ4 compressor module Dan Carpenter
2017-01-31 10:43 ` Dan Carpenter
@ 2017-01-31 12:09 ` Sven Schmidt (4sschmid)
2017-01-31 16:36 ` Dan Carpenter
2 siblings, 0 replies; 4+ messages in thread
From: Sven Schmidt (4sschmid) @ 2017-01-31 12:09 UTC (permalink / raw)
To: kernel-janitors
Am 31. Januar 2017 11:43:28 MEZ schrieb Dan Carpenter <dan.carpenter@oracle.com>:
>Same thing for lz4hc_compress() as well.
>
> lib/lz4/lz4hc_compress.c:622 lz4hc_compress()
> warn: variable dereferenced before check 'dst_len' (see line 612)
>
>regards,
>dan carpenter
Hi Dan,
I did not receive any previous E-Mails, so this one is a bit out of context for me. I checked the kernel-janitors archive though and found the E-Mail you may reference to.
I will fix it.
Is there a way to automatically receive any following messages?
Thanks,
Sven
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug report] lib: update LZ4 compressor module
2017-01-31 10:41 [bug report] lib: update LZ4 compressor module Dan Carpenter
2017-01-31 10:43 ` Dan Carpenter
2017-01-31 12:09 ` Sven Schmidt (4sschmid)
@ 2017-01-31 16:36 ` Dan Carpenter
2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-01-31 16:36 UTC (permalink / raw)
To: kernel-janitors
On Tue, Jan 31, 2017 at 01:09:23PM +0100, Sven Schmidt (4sschmid) wrote:
> Am 31. Januar 2017 11:43:28 MEZ schrieb Dan Carpenter <dan.carpenter@oracle.com>:
> >Same thing for lz4hc_compress() as well.
> >
> > lib/lz4/lz4hc_compress.c:622 lz4hc_compress()
> > warn: variable dereferenced before check 'dst_len' (see line 612)
> >
> >regards,
> >dan carpenter
>
> Hi Dan,
>
> I did not receive any previous E-Mails, so this one is a bit out of context for me. I checked the kernel-janitors archive though and found the E-Mail you may reference to.
>
> I will fix it.
>
> Is there a way to automatically receive any following messages?
>
It's a Smatch warning.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-31 16:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-31 10:41 [bug report] lib: update LZ4 compressor module Dan Carpenter
2017-01-31 10:43 ` Dan Carpenter
2017-01-31 12:09 ` Sven Schmidt (4sschmid)
2017-01-31 16:36 ` Dan Carpenter
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 NNTP newsgroup(s).