From 3a2f37f40cfceb181ee61ae53a7d6954ce9717cd Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Tue, 28 Sep 2010 09:14:50 -0400 Subject: MtpCursor: Fix long to int truncation bug BUG: 2978335 Change-Id: I2491a2ce3b65afa272540090cabace52067b8534 Signed-off-by: Mike Lockwood --- media/mtp/MtpCursor.cpp | 3 +-- media/mtp/MtpCursor.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'media/mtp') 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); -- cgit v1.1