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

Commitdfca092

Browse files
author
Julian Assange
committed
applied kurt's patch to fix unlikely, but potential, string underflow
problem in psql
1 parentab57e09 commitdfca092

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/bin/psql/stringutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.2 1996/07/28 07:08:15 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.3 1996/08/06 20:23:14 julian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -42,7 +42,7 @@ char *rightTrim(char *s)
4242
{
4343
char*sEnd;
4444
sEnd=s+strlen(s)-1;
45-
while (isspace(*sEnd))
45+
while (sEnd >=s&&isspace(*sEnd))
4646
sEnd--;
4747
if (sEnd<s)
4848
s[0]='\0';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp