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 7
7
*
8
8
*
9
9
* 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 $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -475,7 +475,7 @@ tsvectorrecv(PG_FUNCTION_ARGS)
475
475
/* sanity checks */
476
476
477
477
lex_len = strlen (lexeme );
478
- if (lex_len < 0 || lex_len > MAXSTRLEN )
478
+ if (lex_len > MAXSTRLEN )
479
479
elog (ERROR , "invalid tsvector: lexeme too long" );
480
480
481
481
if (datalen > MAXSTRPOS )
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* 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 $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -2385,7 +2385,7 @@ PQresultStatus(const PGresult *res)
2385
2385
char *
2386
2386
PQresStatus (ExecStatusType status )
2387
2387
{
2388
- if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus [0 ])
2388
+ if (status >= sizeof pgresStatus / sizeof pgresStatus [0 ])
2389
2389
return libpq_gettext ("invalid ExecStatusType code" );
2390
2390
return pgresStatus [status ];
2391
2391
}
Original file line number Diff line number Diff line change 23
23
* Portions Copyright (c) 1994, Regents of the University of California
24
24
*
25
25
* 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 $
27
27
*
28
28
*-------------------------------------------------------------------------
29
29
*/
@@ -178,7 +178,7 @@ pqPuts(const char *s, PGconn *conn)
178
178
int
179
179
pqGetnchar (char * s , size_t len , PGconn * conn )
180
180
{
181
- if (len < 0 || len > (size_t ) (conn -> inEnd - conn -> inCursor ))
181
+ if (len > (size_t ) (conn -> inEnd - conn -> inCursor ))
182
182
return EOF ;
183
183
184
184
memcpy (s , conn -> inBuffer + conn -> inCursor , len );
You can’t perform that action at this time.
0 commit comments