diff options
author | Mike Lockwood <lockwood@android.com> | 2010-09-28 09:14:50 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2010-09-28 09:14:50 -0400 |
commit | e11eba3c8a799a9533bd9a85ef9d570c833b4555 (patch) | |
tree | a3885370bc9704a0641f4234fea00001d8c41f58 | |
parent | 90bbe5e486850df6c70942bcf8b7b6687304f7e1 (diff) | |
download | frameworks_base-e11eba3c8a799a9533bd9a85ef9d570c833b4555.zip frameworks_base-e11eba3c8a799a9533bd9a85ef9d570c833b4555.tar.gz frameworks_base-e11eba3c8a799a9533bd9a85ef9d570c833b4555.tar.bz2 |
MtpCursor: Fix long to int truncation bug
BUG: 2978335
Change-Id: I2491a2ce3b65afa272540090cabace52067b8534
Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r-- | media/mtp/MtpCursor.cpp | 3 | ||||
-rw-r--r-- | media/mtp/MtpCursor.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/media/mtp/MtpCursor.cpp b/media/mtp/MtpCursor.cpp index 865a294..35d90dc 100644 --- a/media/mtp/MtpCursor.cpp +++ b/media/mtp/MtpCursor.cpp @@ -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); diff --git a/media/mtp/MtpCursor.h b/media/mtp/MtpCursor.h index 9e9833f..2e03c29 100644 --- a/media/mtp/MtpCursor.h +++ b/media/mtp/MtpCursor.h @@ -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); |