pgpool2.git / summary / log / commit / refs

commit    8bb337c7d4bed2f5892f54f2f857aa6b07d0bfdb
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Wed Nov 19 01:26:30 2014 +0000

    Fix node id range check bug in trigger_failover_command().
    
    The node id should be lower than NUM_BACKENDS. Probably harmless since
    callers never pass node ids greater or equal to NUM_BACKENDS. But a
    bug is a bug.


src/main/pgpool_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index e59187ad2..c749d59b4 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -2265,7 +2265,7 @@ static int trigger_failover_command(int node, const char *command_line, return 0; /* check failed nodeID */ - if (node < 0 || node > NUM_BACKENDS) + if (node < 0 || node >= NUM_BACKENDS) return -1; info = pool_get_node_info(node); [parent: da7ee6a5fa73]