File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 77 *
88 *
99 * IDENTIFICATION
10- * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.15 2009/01/01 17:23:50 momjian Exp $
10+ * $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.16 2009/05/21 12:54:27 meskes Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -475,7 +475,7 @@ tsvectorrecv(PG_FUNCTION_ARGS)
475475 /* sanity checks */
476476
477477 lex_len = strlen (lexeme );
478- if (lex_len < 0 || lex_len > MAXSTRLEN )
478+ if (lex_len > MAXSTRLEN )
479479 elog (ERROR , "invalid tsvector: lexeme too long" );
480480
481481 if (datalen > MAXSTRPOS )
Original file line number Diff line number Diff line change 88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.200 2009/01/01 17:24:03 momjian Exp $
11+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.201 2009/05/21 12:54:27 meskes Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -2385,7 +2385,7 @@ PQresultStatus(const PGresult *res)
23852385char *
23862386PQresStatus (ExecStatusType status )
23872387{
2388- if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus [0 ])
2388+ if (status >= sizeof pgresStatus / sizeof pgresStatus [0 ])
23892389 return libpq_gettext ("invalid ExecStatusType code" );
23902390 return pgresStatus [status ];
23912391}
Original file line number Diff line number Diff line change 2323 * Portions Copyright (c) 1994, Regents of the University of California
2424 *
2525 * IDENTIFICATION
26- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.138 2009/01/01 17:24:03 momjian Exp $
26+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.139 2009/05/21 12:54:27 meskes Exp $
2727 *
2828 *-------------------------------------------------------------------------
2929 */
@@ -178,7 +178,7 @@ pqPuts(const char *s, PGconn *conn)
178178int
179179pqGetnchar (char * s , size_t len , PGconn * conn )
180180{
181- if (len < 0 || len > (size_t ) (conn -> inEnd - conn -> inCursor ))
181+ if (len > (size_t ) (conn -> inEnd - conn -> inCursor ))
182182 return EOF ;
183183
184184 memcpy (s , conn -> inBuffer + conn -> inCursor , len );
You can’t perform that action at this time.
0 commit comments