pgpool2.git / summary / log / commit / refs

commit    bb7e3f547f15b0fdedfa4aac824b3b104a0d4bed
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Sat Jul 06 23:08:25 2019 +0000

    Fix off-by-one error in query cache module.
    
    When debug print is enabled, it might had tried to access out of bound
    of oid array.


src/query_cache/pool_memqcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query_cache/pool_memqcache.c b/src/query_cache/pool_memqcache.c index a13e8f073..ed0c94dde 100644 --- a/src/query_cache/pool_memqcache.c +++ b/src/query_cache/pool_memqcache.c @@ -1169,7 +1169,7 @@ pool_extract_table_oids(Node *node, int **oidsp) */ foreach(cell, stmt->objects) { - if (num_oids > POOL_MAX_DML_OIDS) + if (num_oids >= POOL_MAX_DML_OIDS) { ereport(LOG, (errmsg("memcache: error while extracting table oids. too many oids:%d", num_oids))); [parent: fee520c03c3d]