Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-2

libmongocrypt does not return the status from an uninitialized mongocrypt_ctx_t

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.0-beta5
    • Affects Version/s: None
    • Component/s: None
    • None

      Steps to reproduce:

      1. Create a mongocrypt_ctx_t for explicit encryption
      2. Call mongocrypt_ctx_setopt_key_alt_name where key_alt_name is invalid BSON
      3. Assert mongocrypt_ctx_setopt_key_alt_name fails
      4. Create a new status (mongocrypt_status_new)
      5. Call mongocrypt_ctx_status(ctx, status)
      6. Assert that the status is not ok. This assert fails.

      I believe the problem is this check in mongocrypt_ctx_status:

         if (!ctx->initialized) {
            return _mongocrypt_ctx_fail_w_msg (ctx, "ctx NULL or uninitialized");
         }
      

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: