diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-16 14:52:48 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-09-16 14:52:48 +0000 |
commit | a7b8a239e2db4cf5ba868dd1f1d8af6a16854b0e (patch) | |
tree | 36645762f16f9f696ba2a8f42d0084225f0c9ae4 /main/libc0.9.32/0003-config-parser-always-initialize-line-pointer.patch | |
parent | 2a2efac1fde2986830b7b0008551fa243a3848ba (diff) | |
download | aports-a7b8a239e2db4cf5ba868dd1f1d8af6a16854b0e.tar.bz2 aports-a7b8a239e2db4cf5ba868dd1f1d8af6a16854b0e.tar.xz |
main/libc0.9.32: new snapshot. enable debugging
Diffstat (limited to 'main/libc0.9.32/0003-config-parser-always-initialize-line-pointer.patch')
-rw-r--r-- | main/libc0.9.32/0003-config-parser-always-initialize-line-pointer.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/libc0.9.32/0003-config-parser-always-initialize-line-pointer.patch b/main/libc0.9.32/0003-config-parser-always-initialize-line-pointer.patch new file mode 100644 index 0000000000..171eeee0bf --- /dev/null +++ b/main/libc0.9.32/0003-config-parser-always-initialize-line-pointer.patch @@ -0,0 +1,30 @@ +From 1f134a1d5456148e212dbe6eb69ce7bee11dc1fb Mon Sep 17 00:00:00 2001 +From: Natanael Copa <natanael.copa@gmail.com> +Date: Thu, 16 Sep 2010 11:51:21 +0000 +Subject: [PATCH 3/3] config parser: always initialize line pointer + +We must always initialize line pointer since data pointer might +have changed due to a realloc (in getserv.c for example). + +Signed-off-by: Natanael Copa <natanael.copa@gmail.com> +--- + libc/misc/internals/parse_config.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/libc/misc/internals/parse_config.c b/libc/misc/internals/parse_config.c +index 6734f35..6d3b6f4 100644 +--- a/libc/misc/internals/parse_config.c ++++ b/libc/misc/internals/parse_config.c +@@ -192,8 +192,7 @@ again: + return 0; + parser->allocated |= 1; + } /* else { assert(parser->data_len > 0); } */ +- if (parser->line == NULL) +- parser->line = parser->data + parser->data_len; ++ parser->line = parser->data + parser->data_len; + /*config_free_data(parser);*/ + + /* Read one line (handling continuations with backslash) */ +-- +1.7.2.3 + |