Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcd7be4d

Browse files
committed
Noted with versions 7.0.3, 7.1.3, and 7.2.1:
The psql interpreter becomes unstable if variable substitutionsare used. The debugger GDB was unable to help however mpatrolreports that the sprintf at mainloop.c:389 is steping one bytefarther than the allocation.William K. Volkman
1 parenteeb1dd5 commitcd7be4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/bin/psql/mainloop.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.47 2002/03/27 19:16:13 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.48 2002/06/15 19:37:48 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"mainloop.h"
@@ -378,7 +378,8 @@ MainLoop(FILE *source)
378378
{
379379
out_length=strlen(value);
380380

381-
new=malloc(len+out_length- (1+in_length)+1);
381+
/* Allow for 'after' character also 2002-05-27 */
382+
new=malloc(len+out_length- (1+in_length)+1+1);
382383
if (!new)
383384
{
384385
psql_error("out of memory\n");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp