Fix potential crash by removing an unnecessary column.
The column I removed is already in the recipient half of the projection. Having two representations of the groupId made reading the groupId out of the cursor non-deterministic, and when compounded with another bug, could cause a crash if one of them was null.
This commit is contained in:
parent
3fec23fd36
commit
f270a6b8c4
1 changed files with 1 additions and 2 deletions
|
@ -760,8 +760,7 @@ public class RecipientDatabase extends Database {
|
|||
List<RecipientSettings> out = new ArrayList<>();
|
||||
|
||||
String[] columns = ArrayUtils.concat(RECIPIENT_FULL_PROJECTION,
|
||||
new String[]{ GroupDatabase.TABLE_NAME + "." + GroupDatabase.GROUP_ID,
|
||||
GroupDatabase.TABLE_NAME + "." + GroupDatabase.V2_MASTER_KEY });
|
||||
new String[]{GroupDatabase.TABLE_NAME + "." + GroupDatabase.V2_MASTER_KEY });
|
||||
|
||||
try (Cursor cursor = db.query(table, columns, query, args, null, null, null)) {
|
||||
while (cursor != null && cursor.moveToNext()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue