* Makefile.am: Replace lib_LTLIBRARIES by noinst_LIBRARIES.
Replace librecode.la by libcode.a and librecode_la by librecode_a.
+2001-10-08 Andreas Schwab <schwab@suse.de>
+
+ * request.c (guarantee_nul_terminator): Fix bound computation for
+ realloc.
+
2001-07-01 Bruno Haible <haible@clisp.cons.org>
* task.c (perform_pass_sequence): Call recode_if_nogo before
/* Conversion of files between different charsets and surfaces.
- Copyright © 1990,92,93,94,96,97,98,99,00 Free Software Foundation, Inc.
+ Copyright © 1990,92,93,94,96,97,98,99,00,01 Free Software Foundation, Inc.
Contributed by François Pinard <pinard@iro.umontreal.ca>, 1990.
This library is free software; you can redistribute it and/or
if (task->output.cursor + 4 >= task->output.limit)
{
RECODE_OUTER outer = task->request->outer;
- size_t old_size = task->output.limit - task->output.buffer;
- size_t new_size = task->output.cursor + 4 - task->output.buffer;
+ size_t size = task->output.cursor + 4 - task->output.buffer;
/* FIXME: Rethink about how the error should be reported. */
- if (REALLOC (task->output.buffer, new_size, char))
+ if (REALLOC (task->output.buffer, size, char))
{
- task->output.cursor = task->output.buffer + old_size;
- task->output.limit = task->output.buffer + new_size;
+ task->output.cursor = task->output.buffer + size - 4;
+ task->output.limit = task->output.buffer + size;
}
}
task->output.cursor[0] = NUL;