diff options
author | Karel Zak | 2019-07-15 11:37:17 +0200 |
---|---|---|
committer | Karel Zak | 2019-07-15 11:37:17 +0200 |
commit | 6744302ce5b23ef19d7cfaa20cb53d27642ea8ac (patch) | |
tree | cf0b984c0ecc6b52e39caf2e39d7f4cc6f9b252a /libmount/src/optstr.c | |
parent | build-sys: Include <stdlib.h> in ./configure wchar_t test (diff) | |
parent | libblkid: fix address sanitizer issues (diff) | |
download | kernel-qcow2-util-linux-6744302ce5b23ef19d7cfaa20cb53d27642ea8ac.tar.gz kernel-qcow2-util-linux-6744302ce5b23ef19d7cfaa20cb53d27642ea8ac.tar.xz kernel-qcow2-util-linux-6744302ce5b23ef19d7cfaa20cb53d27642ea8ac.zip |
Merge branch '2019wk27' of https://github.com/kerolasa/util-linux
* '2019wk27' of https://github.com/kerolasa/util-linux:
libblkid: fix address sanitizer issues
libblkid: check number of test_blkid_save arguments correctly
include/xalloc: ensure xstrdup() and xstrndup() returns nonnull attribute
libmount: fix potential null pointer dereference
libfdisk: fix variable shadowing
lib/ttyutils: avoid checking same thing twice
Diffstat (limited to 'libmount/src/optstr.c')
-rw-r--r-- | libmount/src/optstr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index c0f438fe2..49fc9cc40 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -351,7 +351,9 @@ int mnt_optstr_deduplicate_option(char **optstr, const char *name) end = ol.end; opt = end && *end ? end + 1 : NULL; } - } while (rc == 0 && opt && *opt); + if (opt == NULL) + break; + } while (rc == 0 && *opt); return rc < 0 ? rc : begin ? 0 : 1; } |