Skip to content

Commit dfca092

Browse files
author
Julian Assange
committed
applied kurt's patch to fix unlikely, but potential, string underflow
problem in psql
1 parent ab57e09 commit dfca092

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy