Bug 1282627 - Merge can be confused with a modified trust flags set.
authorRobert Relyea <rrelyea@redhat.com>
Wed, 26 Oct 2016 12:52:10 -0700
changeset 12769 7701b1b052aa31ddf3159d489ebba777094e055c
parent 12768 24232beee1f204c690b2be50845f779dc751ee98
child 12770 b7b419e4e2f6c7bdda9700ac37883dec5e1ddef8
push id1711
push userrrelyea@redhat.com
push dateWed, 26 Oct 2016 19:52:14 +0000
bugs1282627
Bug 1282627 - Merge can be confused with a modified trust flags set. r=franziskus This is the softoken version of the patch
lib/softoken/sdb.c
--- a/lib/softoken/sdb.c
+++ b/lib/softoken/sdb.c
@@ -1006,17 +1006,17 @@ sdb_SetAttributeValue(SDB *sdb, CK_OBJEC
     sqlerr = sqlite3_prepare_v2(sqlDB, newStr, -1, &stmt, NULL);
     if (sqlerr != SQLITE_OK)
         goto loser;
     for (i = 0; i < count; i++) {
         if (template[i].ulValueLen != 0) {
             sqlerr = sqlite3_bind_blob(stmt, i + 1, template[i].pValue,
                                        template[i].ulValueLen, SQLITE_STATIC);
         } else {
-            sqlerr = sqlite3_bind_blob(stmt, i + 2, SQLITE_EXPLICIT_NULL,
+            sqlerr = sqlite3_bind_blob(stmt, i + 1, SQLITE_EXPLICIT_NULL,
                                        SQLITE_EXPLICIT_NULL_LEN, SQLITE_STATIC);
         }
         if (sqlerr != SQLITE_OK)
             goto loser;
     }
     sqlerr = sqlite3_bind_int(stmt, i + 1, object_id);
     if (sqlerr != SQLITE_OK)
         goto loser;