forked from pool/systemd
27 lines
899 B
Diff
27 lines
899 B
Diff
|
From e68893075083a7461b1572233d23fdb23541d630 Mon Sep 17 00:00:00 2001
|
||
|
From: Michael Terry <michael.terry@canonical.com>
|
||
|
Date: Fri, 14 Dec 2012 09:02:13 -0500
|
||
|
Subject: [PATCH] libudev: validate 'udev' argument to udev_enumerate_new()
|
||
|
|
||
|
https://bugs.freedesktop.org/show_bug.cgi?id=58289
|
||
|
---
|
||
|
src/libudev/libudev-enumerate.c | 2 ++
|
||
|
1 file changed, 2 insertions(+)
|
||
|
|
||
|
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
|
||
|
index 1729655..6a5f4e0 100644
|
||
|
--- a/src/libudev/libudev-enumerate.c
|
||
|
+++ b/src/libudev/libudev-enumerate.c
|
||
|
@@ -81,6 +81,8 @@ _public_ struct udev_enumerate *udev_enumerate_new(struct udev *udev)
|
||
|
{
|
||
|
struct udev_enumerate *udev_enumerate;
|
||
|
|
||
|
+ if (udev == NULL)
|
||
|
+ return NULL;
|
||
|
udev_enumerate = calloc(1, sizeof(struct udev_enumerate));
|
||
|
if (udev_enumerate == NULL)
|
||
|
return NULL;
|
||
|
--
|
||
|
1.7.10.4
|
||
|
|