mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-08 23:08:33 +00:00
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
@ -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…
x
Reference in New Issue
Block a user