aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDong Jinguang <dongjinguang@huawei.com>2018-01-03 00:39:42 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-01-03 00:39:42 +0000
commit1dae5eab9740e233aa404d39507ffe6123794b84 (patch)
tree9c87c5344f3f145ab119d4279204af8bcd97589b
parentc010544766c02529438565ebac8fb931d632a5d8 (diff)
parent58e29f870e3ac772d23d30ec17bb001d032e2a71 (diff)
downloade2fsprogs-1dae5eab9740e233aa404d39507ffe6123794b84.tar.gz
Merge "blkid: sanity check 'end' address must be greater than or equal to 'lable' address."
am: 58e29f870e Change-Id: I9dc8f544fd6602b8040ab884e7a79ce4ed711b30
-rw-r--r--lib/blkid/probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
index 3bcf4c3d..865d9aa3 100644
--- a/lib/blkid/probe.c
+++ b/lib/blkid/probe.c
@@ -41,7 +41,7 @@ static int figure_label_len(const unsigned char *label, int len)
{
const unsigned char *end = label + len - 1;
- while ((*end == ' ' || *end == 0) && end >= label)
+ while (end >= label && (*end == ' ' || *end == 0))
--end;
if (end >= label)
return end - label + 1;