Contents of /trunk/hal/patches/hal-0.5.10-fix-possible-segfault-on-fdi-cache-recreation.patch
Parent Directory | Revision Log
Revision 597 -
(show annotations)
(download)
Mon May 19 19:05:19 2008 UTC (16 years, 4 months ago) by niro
File size: 1258 byte(s)
Mon May 19 19:05:19 2008 UTC (16 years, 4 months ago) by niro
File size: 1258 byte(s)
-gentoo patches
1 | From fabe3b7dd0df4580948c841c60d187bf7d825ae3 Mon Sep 17 00:00:00 2001 |
2 | From: Danny Kukawka <danny.kukawka@web.de> |
3 | Date: Thu, 6 Dec 2007 21:16:02 +0100 |
4 | Subject: [PATCH] fix possible segfault on fdi-cache recreation |
5 | |
6 | This fixes https://bugzilla.novell.com/show_bug.cgi?id=344231, where |
7 | HAL crash if a fdi-file get changed/updated and a new device appears |
8 | after the recreation of the FDI cache. |
9 | --- |
10 | hald/device_info.c | 4 +++- |
11 | 1 files changed, 3 insertions(+), 1 deletions(-) |
12 | |
13 | diff --git a/hald/device_info.c b/hald/device_info.c |
14 | index d601e60..88936cd 100644 |
15 | --- a/hald/device_info.c |
16 | +++ b/hald/device_info.c |
17 | @@ -1119,13 +1119,15 @@ rules_match_and_merge_device (void *fdi_rules_list, HalDevice *d) |
18 | /* merge the device info type, either preprobe, info or policy */ |
19 | gboolean |
20 | di_search_and_merge (HalDevice *d, DeviceInfoType type){ |
21 | - struct cache_header *header = (struct cache_header*) RULES_PTR(0); |
22 | + struct cache_header *header; |
23 | |
24 | /* make sure our fdi rule cache is up to date */ |
25 | if (di_cache_coherency_check (FALSE)) { |
26 | di_rules_init (); |
27 | } |
28 | |
29 | + header = (struct cache_header*) RULES_PTR(0); |
30 | + |
31 | switch (type) { |
32 | case DEVICE_INFO_TYPE_PREPROBE: |
33 | /* Checking if we have at least one preprobe rule */ |
34 | -- |
35 | 1.5.3.7 |
36 |