mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 23:56:58 +03:00
Fix off-by-one memory allocation, as reported by Rod Taylor. Also
avoid repalloc'ing twice when once is sufficient.
This commit is contained in:
parent
42a8068b5c
commit
eac07f1fd7
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.87.2.4 2003/04/13 04:07:31 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.87.2.5 2004/11/17 19:54:53 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -281,7 +281,7 @@ tokenize_inc_file(const char *inc_filename)
|
|||||||
{
|
{
|
||||||
if (strlen(comma_str))
|
if (strlen(comma_str))
|
||||||
{
|
{
|
||||||
comma_str = repalloc(comma_str, strlen(comma_str) + 1);
|
comma_str = repalloc(comma_str, strlen(comma_str) + 1 + 1);
|
||||||
strcat(comma_str, MULTI_VALUE_SEP);
|
strcat(comma_str, MULTI_VALUE_SEP);
|
||||||
}
|
}
|
||||||
comma_str = repalloc(comma_str,
|
comma_str = repalloc(comma_str,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user