Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-90

library crashes in instance.c libcouchbase_switch_to_backup_node.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • None
    • 1.1.0dp9
    • library
    • Security Level: Public
    • None
    • Windows

    Description

      library crashes when accessing into allocated memory at instance->backup_nodes[instance->backup_idx].

      instance->backup_nodes[instance->backup_idx] is not necessarily NULL when instance->backup_idx is >= instance->nbackup_nodes.

      This was fixed by changing line 729 from:

      if (instance->backup_nodes[instance->backup_idx] == NULL)

      { --instance->backup_idx; libcouchbase_error_handler(instance, error, reason); return -1; }

      to:

      if (instance->backup_idx >= instance->nbackup_nodes || instance->backup_nodes[instance->backup_idx] == NULL) { --instance->backup_idx; libcouchbase_error_handler(instance, error, reason); return -1; }

      This prevents indexing past the number of backup_nodes that have been allocated.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            avsej Sergey Avseyev
            brettharrison Brett Harrison
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty