diff options
| author | Daniel Golle | 2020-05-11 23:26:28 +0000 |
|---|---|---|
| committer | Daniel Golle | 2020-05-11 23:41:59 +0000 |
| commit | 84269037b75de93bdd4ea75b7f50ba77ba976377 (patch) | |
| tree | 64c3b66078ed873b31750814e6285f7eb6e7caae | |
| parent | eec16e2f275dc3dcf71e4a27dd608d3dc8f8df1a (diff) | |
| download | fstools-84269037b75de93bdd4ea75b7f50ba77ba976377.tar.gz | |
blockd: fix segfault triggered by non-autofs mounts
Program received signal SIGSEGV, Segmentation fault.
main_autofs (argv=<optimized out>, argc=<optimized out>)
at fstools-2020-05-06-eec16e2f/block.c:1193
1193: if (!m->autofs && (mp = find_mount_point(pr->dev))) {
Fixes: 9ab936d ("block(d): always call hotplug.d "mount" scripts from blockd")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
| -rw-r--r-- | block.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1190,7 +1190,7 @@ static int main_autofs(int argc, char **argv) continue; blockd_notify("hotplug", pr->dev, m, pr); - if (!m->autofs && (mp = find_mount_point(pr->dev))) { + if ((!m || !m->autofs) && (mp = find_mount_point(pr->dev))) { blockd_notify("mount", pr->dev, NULL, NULL); free(mp); } |