updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / hal / path-max.patch
blob304185d7d8dd4dfa43f6cd7013264decbea6c7ff
1 From a2c3dd5a04d79265772c09c4280606d5c2ed72c6 Mon Sep 17 00:00:00 2001
2 From: Martin Pitt <martin.pitt@ubuntu.com>
3 Date: Mon, 04 Jan 2010 15:56:13 +0000
4 Subject: Bump HAL_PATH_MAX to 4096
6 Some bits in the code use realpath() with destination paths of size
7 HAL_PATH_MAX. This potentially breaks on systems where PATH_MAX is bigger than
8 HAL_PATH_MAX (which was 512 until now).
10 Since we can't use PATH_MAX directly (due to platforms like GNU/Hurd, which
11 apparently don't have it), just bump HAL_PATH_MAX to 4096 (as PATH_MAX is on
12 Linux), to avoid potential buffer overflows and also fix hal on Linux when
13 enabling FORTIFY in gcc.
15 https://bugs.freedesktop.org/show_bug.cgi?id=25888
16 ---
17 diff --git a/hald/util.h b/hald/util.h
18 index c2a1584..7883333 100644
19 --- a/hald/util.h
20 +++ b/hald/util.h
21 @@ -38,7 +38,7 @@
22 #endif
24 #define HAL_NAME_MAX 256
25 -#define HAL_PATH_MAX 512
26 +#define HAL_PATH_MAX 4096
28 gboolean hal_util_remove_trailing_slash (gchar *path);
31 cgit v0.8.3-6-g21f6