Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e11eba3c authored by Mike Lockwood's avatar Mike Lockwood
Browse files

MtpCursor: Fix long to int truncation bug



BUG: 2978335

Change-Id: I2491a2ce3b65afa272540090cabace52067b8534
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 90bbe5e4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -399,8 +399,7 @@ bool MtpCursor::prepareRow(CursorWindow* window) {
}


bool MtpCursor::putLong(CursorWindow* window, int value, int row, int column) {

bool MtpCursor::putLong(CursorWindow* window, int64_t value, int row, int column) {
    if (!window->putLong(row, column, value)) {
        window->freeLastRow();
        LOGE("Failed allocating space for a long in column %d", column);
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ private:
                        MtpObjectHandle objectID, int row);

    bool        prepareRow(CursorWindow* window);
    bool        putLong(CursorWindow* window, int value, int row, int column);
    bool        putLong(CursorWindow* window, int64_t value, int row, int column);
    bool        putString(CursorWindow* window, const char* text, int row, int column);
    bool        putThumbnail(CursorWindow* window, MtpObjectHandle objectID,
                            MtpObjectFormat format, int row, int column);