|
Zbigniew Jędrzejewski-Szmek |
794d16 |
From 61ccd1762fa0f9a8ec9285a8a7367fc03bcc5982 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
From: Dave Reisner <dreisner@archlinux.org>
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
Date: Fri, 4 Oct 2013 18:22:40 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
Subject: [PATCH] mount: check for NULL before reading pm->what
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
Since a57f7e2c828b85, a mount unit with garbage in it would cause
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
systemd to crash on loading it.
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
ref: https://bugs.freedesktop.org/show_bug.cgi?id=70148
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
src/core/mount.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
index 93bfa99..db055f0 100644
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
--- a/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
+++ b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
@@ -182,7 +182,7 @@ static int mount_add_mount_links(Mount *m) {
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
* for the source path (if this is a bind mount) to be
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
* available. */
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
pm = get_mount_parameters_fragment(m);
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
- if (pm && path_is_absolute(pm->what)) {
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
+ if (pm && pm->what && path_is_absolute(pm->what)) {
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
r = unit_require_mounts_for(UNIT(m), pm->what);
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
794d16 |
return r;
|