diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2010-01-04 16:56:13 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2010-01-04 16:56:13 +0100 |
commit | a2c3dd5a04d79265772c09c4280606d5c2ed72c6 (patch) | |
tree | f2395ecff70192ee320701262759d6961186701a | |
parent | dcb2829b8eff61463b0869614ddb07b1c86cecaa (diff) | |
download | hal-a2c3dd5a04d79265772c09c4280606d5c2ed72c6.tar.gz |
Bump HAL_PATH_MAX to 4096
Some bits in the code use realpath() with destination paths of size
HAL_PATH_MAX. This potentially breaks on systems where PATH_MAX is bigger than
HAL_PATH_MAX (which was 512 until now).
Since we can't use PATH_MAX directly (due to platforms like GNU/Hurd, which
apparently don't have it), just bump HAL_PATH_MAX to 4096 (as PATH_MAX is on
Linux), to avoid potential buffer overflows and also fix hal on Linux when
enabling FORTIFY in gcc.
https://bugs.freedesktop.org/show_bug.cgi?id=25888
-rw-r--r-- | hald/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hald/util.h b/hald/util.h index c2a1584b..7883333c 100644 --- a/hald/util.h +++ b/hald/util.h @@ -38,7 +38,7 @@ #endif #define HAL_NAME_MAX 256 -#define HAL_PATH_MAX 512 +#define HAL_PATH_MAX 4096 gboolean hal_util_remove_trailing_slash (gchar *path); |