From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib: don't pass NULL to strcmp in safe_mount
Date: Wed, 20 Nov 2019 01:51:38 -0500 (EST) [thread overview]
Message-ID: <2022379807.13117932.1574232698559.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAEemH2fiyODj=FedbVK8xtrgz1T3JWO5dBiSUbA1L24XOx2yqA@mail.gmail.com>
----- Original Message -----
> On Tue, Nov 19, 2019 at 6:29 PM Jan Stancek <jstancek@redhat.com> wrote:
>
> > Rachel reports, that pivot_root01 crashes on latest LTP:
> > Thread 3.1 "pivot_root01" received signal SIGSEGV, Segmentation fault.
> > 0x00000000004062c4 in safe_mount (file=file@entry=0x413017
> > "pivot_root01.c"
> > 733 if (strcmp(filesystemtype, "ntfs")) {
> >
> > Don't pass NULL ptr to strcmp. Also fix return in unreachable path,
> > to suppress warning about returning uninitialized 'rval'.
> >
>
> Good catch.
>
> And shouldn't we give a "correct" fs_type in pivot_root01.c too? Otherwise,
> the test would be failed on an invalid mounted operation I guess.
Per man-page, it should be ignored.
next prev parent reply other threads:[~2019-11-20 6:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 10:29 [LTP] [PATCH] lib: don't pass NULL to strcmp in safe_mount Jan Stancek
2019-11-20 6:02 ` Li Wang
2019-11-20 6:51 ` Jan Stancek [this message]
2019-11-20 7:53 ` Li Wang
2019-11-20 11:22 ` Cyril Hrubis
2019-11-21 8:10 ` Jan Stancek
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=2022379807.13117932.1574232698559.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/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