There is a bug in the Fedora specific patches:
$ git diff
diff --git a/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch b/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch
index dc55b39..62ac393 100644
--- a/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch
+++ b/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch
@@ -58,7 +58,7 @@ index 4da6b64..14dc459 100644
list_add_tail(&rd->devs, &rs->devs);
n++;
- } while (end++ != '\0');
-+ } while (*end++ != '\0');
++ } while ((end != NULL) && *(++end) != '\0');
rs->total_devs = rs->found_devs = n;
rs_tmp = rs;
without the patch dmraid fails:
# dmraid -f isw -C Test0 --type 1 --disk "/dev/sdb /dev/sdc"
ERROR: isw: the RAID set cannot have less than 2 hard drives
With the patch creating the RAID succeeds.
It's a logical bug because remove_delimiter() returns NULL
Good catch Harald! Thank you!
My fault! Though the type suggests the original is missing dereferencing, it is actually equivalent to correct `}| while (end++ != NULL)`
Comment 4Fedora Update System
2018-08-14 16:44:39 UTC
There is a bug in the Fedora specific patches: $ git diff diff --git a/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch b/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch index dc55b39..62ac393 100644 --- a/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch +++ b/dmraid-fix-errors-and-warnings-triggered-by-CFLAGS.patch @@ -58,7 +58,7 @@ index 4da6b64..14dc459 100644 list_add_tail(&rd->devs, &rs->devs); n++; - } while (end++ != '\0'); -+ } while (*end++ != '\0'); ++ } while ((end != NULL) && *(++end) != '\0'); rs->total_devs = rs->found_devs = n; rs_tmp = rs; without the patch dmraid fails: # dmraid -f isw -C Test0 --type 1 --disk "/dev/sdb /dev/sdc" ERROR: isw: the RAID set cannot have less than 2 hard drives With the patch creating the RAID succeeds. It's a logical bug because remove_delimiter() returns NULL