Skip to content
Snippets Groups Projects
Commit dfca0926 authored by Julian Assange's avatar Julian Assange
Browse files

applied kurt's patch to fix unlikely, but potential, string underflow

problem in psql
parent ab57e09e
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.2 1996/07/28 07:08:15 scrappy Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.3 1996/08/06 20:23:14 julian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -42,7 +42,7 @@ char *rightTrim(char *s)
{
char *sEnd;
sEnd = s+strlen(s)-1;
while (isspace(*sEnd))
while (sEnd >= s && isspace(*sEnd))
sEnd--;
if (sEnd < s)
s[0]='\0';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment