diff options
author | kan <kan@FreeBSD.org> | 2003-08-12 23:27:02 +0800 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-08-12 23:27:02 +0800 |
commit | 8025f1b9de193d39e660c17996acdb011e9fac17 (patch) | |
tree | da744644425a7c5b5deaf086a7c43b5f11dca190 /print/a2ps-letter | |
parent | a63ef49fc5a1d48dd62185163213699c6644b889 (diff) | |
download | freebsd-ports-gnome-8025f1b9de193d39e660c17996acdb011e9fac17.tar.gz freebsd-ports-gnome-8025f1b9de193d39e660c17996acdb011e9fac17.tar.zst freebsd-ports-gnome-8025f1b9de193d39e660c17996acdb011e9fac17.zip |
Properly fix the a2ps crash within included gettext. Map pointers
should be recalculated if realloc moves the memory block they used
to point to.
Diffstat (limited to 'print/a2ps-letter')
-rw-r--r-- | print/a2ps-letter/files/patch-intl-localealias.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/print/a2ps-letter/files/patch-intl-localealias.c b/print/a2ps-letter/files/patch-intl-localealias.c index 2d0279bf9751..074a19569ca5 100644 --- a/print/a2ps-letter/files/patch-intl-localealias.c +++ b/print/a2ps-letter/files/patch-intl-localealias.c @@ -1,19 +1,20 @@ ---- intl/localealias.c.orig Tue Aug 31 19:29:35 1999 -+++ intl/localealias.c Sun Jul 6 05:35:31 2003 -@@ -333,12 +333,12 @@ +--- intl/localealias.c.orig Tue Aug 31 13:29:35 1999 ++++ intl/localealias.c Tue Aug 12 11:09:53 2003 +@@ -329,6 +329,17 @@ + FREE_BLOCKS (block_list); + return added; + } ++ if (string_space != new_pool) ++ { ++ size_t i; ++ ++ for (i = 0; i < nmap; i++) ++ { ++ map[i].alias += new_pool - string_space; ++ map[i].value += new_pool - string_space; ++ } ++ } ++ + string_space = new_pool; string_space_max = new_size; } - -- map[nmap].alias = memcpy (&string_space[string_space_act], -- alias, alias_len); -+ memcpy (&string_space[string_space_act], alias, alias_len); -+ map[nmap].alias = &string_space[string_space_act]; - string_space_act += alias_len; - -- map[nmap].value = memcpy (&string_space[string_space_act], -- value, value_len); -+ memcpy (&string_space[string_space_act], value, value_len); -+ map[nmap].value = &string_space[string_space_act]; - string_space_act += value_len; - - ++nmap; |