We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa89e18 commit e7f4923Copy full SHA for e7f4923
src/interfaces/libpq/fe-exec.c
@@ -8,7 +8,7 @@
8
*
9
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.201 2009/05/21 12:54:27 meskes Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.202 2009/05/27 14:16:51 meskes Exp $
12
13
*-------------------------------------------------------------------------
14
*/
@@ -2385,7 +2385,7 @@ PQresultStatus(const PGresult *res)
2385
char *
2386
PQresStatus(ExecStatusType status)
2387
{
2388
- if (status >= sizeof pgresStatus / sizeof pgresStatus[0])
+ if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
2389
return libpq_gettext("invalid ExecStatusType code");
2390
return pgresStatus[status];
2391
}
0 commit comments