Nick Kralevich
63e5142283
am 6b86f3fe
: am 5e44f5cc
: am 2c58af52
: Merge "VectorImpl.cpp: fix benign multiplication overflow"
...
* commit '6b86f3fe304c7aa4f2c629a1cacd84428aad9a3e':
VectorImpl.cpp: fix benign multiplication overflow
2015-08-28 17:46:51 +00:00
Nick Kralevich
5e44f5cc0c
am 2c58af52
: Merge "VectorImpl.cpp: fix benign multiplication overflow"
...
* commit '2c58af52232f0c8b4ab09d75eba66d1283805cab':
VectorImpl.cpp: fix benign multiplication overflow
2015-08-28 17:28:37 +00:00
Nick Kralevich
c76698f24e
VectorImpl.cpp: fix benign multiplication overflow
...
j is a ssize_t, which can go negative. If it goes negative,
the resulting multiplication of mItemSize*j doesn't make
any sense. Since the value is never used, just don't perform
the calculation if j < 0.
Bug: 23607865
Change-Id: I14f6f6506645d582f7d67a2e2d60ead3cb18b957
2015-08-28 06:40:23 -07:00
Abhishek Arya
09f2d36e1d
am 5b33306d
: Merge "libutils: fix overflow in SharedBuffer [DO NOT MERGE]" into mnc-dev
...
* commit '5b33306dba456ec906f7c9bd522681c1de137f78':
libutils: fix overflow in SharedBuffer [DO NOT MERGE]
2015-08-26 20:12:44 +00:00
Sergio Giro
d95e47f136
libutils: fix overflow in SharedBuffer [DO NOT MERGE]
...
See
https://code.google.com/p/android/issues/detail?id=181910
Bug: 22952485
(cherry picked from commit 66b6eb9490
)
Change-Id: I363f49b5b3c6b7b3ac08cba2c14d72c431588c5a
2015-08-25 17:40:47 +01:00
Nick Kralevich
223286e396
am b37862e4
: am 7ec4c228
: am e80ec0c5
: Merge "libutils: Enable LOCAL_SANITIZE := integer"
...
* commit 'b37862e4988f90fdbc3e2e48dd72368690579d6d':
libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 23:40:16 +00:00
Nick Kralevich
b37862e498
am 7ec4c228
: am e80ec0c5
: Merge "libutils: Enable LOCAL_SANITIZE := integer"
...
* commit '7ec4c228ee9d50d16306331abacb607bc70fadd8':
libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 21:51:14 +00:00
Nick Kralevich
2bcb9221d4
am 7ec4c228
: am e80ec0c5
: Merge "libutils: Enable LOCAL_SANITIZE := integer"
...
* commit '7ec4c228ee9d50d16306331abacb607bc70fadd8':
libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 21:51:09 +00:00
Nick Kralevich
4d587f2f9a
libutils: Enable LOCAL_SANITIZE := integer
...
Call abort() on undefined or sketchy integer behavior.
Protects against integer overflow attacks.
Change-Id: I475e5e9fb04160dd2d201e926ab2b897539f8bb6
2015-08-24 10:51:38 -07:00
Nick Kralevich
58e3d3e627
am 567bb226
: am 4f0a7cb8
: am 786e5e26
: Merge "libutils: cleanups for -fsanitize=integer"
...
* commit '567bb2265039097d8fe272240596b12af35468c4':
libutils: cleanups for -fsanitize=integer
2015-08-24 16:27:12 +00:00
Nick Kralevich
567bb22650
am 4f0a7cb8
: am 786e5e26
: Merge "libutils: cleanups for -fsanitize=integer"
...
* commit '4f0a7cb8e15ce50f7da6a71c96335bd0b7394492':
libutils: cleanups for -fsanitize=integer
2015-08-24 16:02:51 +00:00
Nick Kralevich
50659902d2
am 4f0a7cb8
: am 786e5e26
: Merge "libutils: cleanups for -fsanitize=integer"
...
* commit '4f0a7cb8e15ce50f7da6a71c96335bd0b7394492':
libutils: cleanups for -fsanitize=integer
2015-08-24 16:02:36 +00:00
Nick Kralevich
1f28698998
libutils: cleanups for -fsanitize=integer
...
* Hashing functions rely on integer overflow behavior.
Mark those functions as safe.
* abort() if a passed in size_t value is greater than
UINT32_MAX. This can occur on 64 bit builds where size_t
is larger than uint32_t.
* Special case the index lookup for an empty sorted vector.
Without the special case, size() == 0, and size()-1 underflows.
Change-Id: I343a14b589fc8f0d221c1998ae5d6f0b9e2781f8
2015-08-24 15:52:22 +00:00
Sergio Giro
7987b83553
libutils: fix overflow in SharedBuffer
...
See
https://code.google.com/p/android/issues/detail?id=181910
Bug: 22952485
Change-Id: Idcc7e581a69436c8a623659fbd9add9e5f0d4c74
2015-08-21 14:17:32 +01:00
Abhishek Arya
d1a6188e8c
am a77a0487
: am 219a006f
: am fc5fdc85
: am e45d96d6
: am 19398a71
: am d34846b7
: am cd407a17
: am e0dce90b
: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'a77a0487525df3add570605e58a7eb3a03eca6a8':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:40:02 +00:00
Abhishek Arya
64e2d8c0dc
am 219a006f
: am fc5fdc85
: am e45d96d6
: am 19398a71
: am d34846b7
: am cd407a17
: am e0dce90b
: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit '219a006f89a5448a9a6eeb1f37ad0088e85bd3f8':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:12:31 +00:00
Abhishek Arya
219a006f89
am fc5fdc85
: am e45d96d6
: am 19398a71
: am d34846b7
: am cd407a17
: am e0dce90b
: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'fc5fdc85683f87c42d5ce7bcee4e2b70ef0acdd0':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:05:07 +00:00
Abhishek Arya
fc5fdc8568
am e45d96d6
: am 19398a71
: am d34846b7
: am cd407a17
: am e0dce90b
: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'e45d96d6bf592f0ae20bb021ea529acc94e0cb55':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:54:21 +00:00
Abhishek Arya
d34846b70b
am cd407a17
: am e0dce90b
: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'cd407a17fe326f3e18866ddddb1c747b06a45fc0':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:23:50 +00:00
Abhishek Arya
cd407a17fe
am e0dce90b
: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'e0dce90b0de2b2b7c2baae8035f810a55526effb':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:18:47 +00:00
Abhishek Arya
e0dce90b0d
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
Bug: 23290056
Change-Id: If6e22b0159de6635a8ca5305895b7718f15becc7
2015-08-20 21:55:55 -07:00
Sergio Giro
93f106b8d0
am e97682be
: am a1a22b57
: am e67b5848
: am 4956c0fe
: am 5b85b1d4
: libutils: fix overflow in String8::allocFromUTF8
...
* commit 'e97682be0634fe773f70097bc518e5d034efe8f7':
libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:58:19 +00:00
Sergio Giro
e67b584869
am 4956c0fe
: am 5b85b1d4
: libutils: fix overflow in String8::allocFromUTF8
...
* commit '4956c0fe1e582a8497aff34a41aeb8bf4748eef0':
libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:28:53 +00:00
Sergio Giro
4956c0fe1e
am 5b85b1d4
: libutils: fix overflow in String8::allocFromUTF8
...
* commit '5b85b1d40d619c2064d321364f212ebfeb6ba185':
libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:23:47 +00:00
Sergio Giro
5b85b1d40d
libutils: fix overflow in String8::allocFromUTF8
...
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908
Bug: 23290056
(cherry picked from commit 4eeacbeec0
)
Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
(cherry picked from commit ebabef2752
)
2015-08-18 20:52:25 +00:00
Sergio Giro
c4abbcbdde
am f468d1e1
: am 1d44be87
: Merge "libutils: fix overflow in String8::allocFromUTF8"
...
* commit 'f468d1e14c0bb777d557a6a86dead260e40ff8aa':
libutils: fix overflow in String8::allocFromUTF8
2015-08-18 17:25:33 +00:00
Sergio Giro
ba71601aac
am 29c12755
: Merge "libutils: fix overflow in String8::allocFromUTF8" into mnc-dev
...
* commit '29c1275519ef85fa3f30be351f19dc6e7eedbee9':
libutils: fix overflow in String8::allocFromUTF8
2015-08-18 17:19:10 +00:00
Sergio Giro
ebabef2752
libutils: fix overflow in String8::allocFromUTF8
...
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908
Bug: 23290056
(cherry picked from commit 4eeacbeec0
)
Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-18 18:06:38 +01:00
Sergio Giro
1d44be87ff
Merge "libutils: fix overflow in String8::allocFromUTF8"
2015-08-18 17:04:07 +00:00
Sergio Giro
4eeacbeec0
libutils: fix overflow in String8::allocFromUTF8
...
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908
Bug: 23290056
Change-Id: Ide0e9a8acc4e95a9104bab3ae803aa3a40098222
2015-08-18 14:44:54 +01:00
Nick Kralevich
eec5baa0f7
am 77b9868a
: am 6d814037
: Merge "libutils: fix signed/unsigned comparison warnings"
...
* commit '77b9868af9313ab5b7f62d7fea709dbfb519dd2c':
libutils: fix signed/unsigned comparison warnings
2015-08-18 04:16:13 +00:00
Nick Kralevich
a0683307e7
am 77b9868a
: am 6d814037
: Merge "libutils: fix signed/unsigned comparison warnings"
...
* commit '77b9868af9313ab5b7f62d7fea709dbfb519dd2c':
libutils: fix signed/unsigned comparison warnings
2015-08-18 04:15:23 +00:00
Nick Kralevich
3e6c451908
libutils: fix signed/unsigned comparison warnings
...
Change-Id: Ib283c85a404a20688c5357fa513e5d07c2f42803
2015-08-17 20:54:15 -07:00
Elliott Hughes
5ec940aed8
am fb1ecbc5
: am e6e71608
: Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
...
* commit 'fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f':
Use __ANDROID__ instead of HAVE_ANDROID_OS.
2015-07-30 16:50:27 +00:00
Elliott Hughes
145afc2cc4
am fb1ecbc5
: am e6e71608
: Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
...
* commit 'fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f':
Use __ANDROID__ instead of HAVE_ANDROID_OS.
2015-07-30 16:50:15 +00:00
Elliott Hughes
e6e71608bd
Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
2015-07-30 16:34:47 +00:00
Elliott Hughes
9b828adfad
Use __ANDROID__ instead of HAVE_ANDROID_OS.
...
Change-Id: I9967f3fd758c2a5b40be5b60ae72be7e2fb75136
2015-07-30 09:33:43 -07:00
Elliott Hughes
bb9c0a0031
am 42dbc4b1
: am 44443bea
: Merge "Use _WIN32 rather than HAVE_WINSOCK."
...
* commit '42dbc4b1859fe4de16b19e9b74324b345c5fcb9d':
Use _WIN32 rather than HAVE_WINSOCK.
2015-07-30 15:17:38 +00:00
Elliott Hughes
c6dbc85845
am 42dbc4b1
: am 44443bea
: Merge "Use _WIN32 rather than HAVE_WINSOCK."
...
* commit '42dbc4b1859fe4de16b19e9b74324b345c5fcb9d':
Use _WIN32 rather than HAVE_WINSOCK.
2015-07-30 15:17:07 +00:00
Elliott Hughes
adbf442a51
Use _WIN32 rather than HAVE_WINSOCK.
...
Change-Id: I9855b6fe72e2f2f3a8360c0993a67cb988024ee4
2015-07-29 17:45:24 -07:00
Elliott Hughes
2c1917f156
am 34c92f46
: am fc2f1e61
: Merge "Move libutils off AndroidConfig.h."
...
* commit '34c92f4652651697a7de7fa10c214afed9a6658a':
Move libutils off AndroidConfig.h.
2015-07-30 00:16:18 +00:00
Elliott Hughes
92a3d2ba32
am 34c92f46
: am fc2f1e61
: Merge "Move libutils off AndroidConfig.h."
...
* commit '34c92f4652651697a7de7fa10c214afed9a6658a':
Move libutils off AndroidConfig.h.
2015-07-30 00:15:35 +00:00
Elliott Hughes
1f8bc86a7d
Move libutils off AndroidConfig.h.
...
Change-Id: Ia0e4a4f968c640eb44317821d2dc6b195f9f490e
2015-07-29 14:31:54 -07:00
Elliott Hughes
5b8ff09578
resolved conflicts for merge of b40ebc54
to mnc-dev-plus-aosp
...
Change-Id: I9da05b46da2326ae21d164b137be57a9b5220f7b
2015-06-30 15:17:14 -07:00
Elliott Hughes
6ed68cc412
Consistently use strerror in libutils.
...
It's easier for people to debug, and side-steps the problem that errno
values differ between architectures.
Bug: http://b/17458391
Change-Id: I1db9b2cbb653839d3936b91e37e5cff02671318a
2015-06-30 10:41:15 -07:00
Evgenii Stepanov
fc21508615
am 3c90808d
: am c1c7f457
: Merge "Add a space before :=."
...
* commit '3c90808d6d257d75d5ebd64af5d0374aa4f03cb4':
Add a space before :=.
2015-06-13 02:25:34 +00:00
Evgenii Stepanov
6aaf740834
Add a space before :=.
...
Change-Id: Ib1d94648cdc163675ac7b6acf86408d5be6b5ad2
2015-06-12 14:18:33 -07:00
Jeff Brown
20432c237c
Merge "Work around spurious epoll notifications." into mnc-dev
2015-05-30 00:43:10 +00:00
Jeff Brown
18a574f715
Work around spurious epoll notifications.
...
Sometimes it seems like we can get into a situation where we are
unable to remove an fd from the epoll set but it keeps sending us
events anyhow. Defensively rebuild the epoll set in this case
to prevent us from spinning forever.
Bug: 21271428
Change-Id: I5607e565f2e12460d7113a1f62a70d38d334e271
2015-05-29 17:40:25 -07:00
Michael Lentine
6078805023
Adding a build id check to blob cache.
...
Add a build id field to the header structure in blob cache. Add build
id support with reading and writing the cache. When the cache gets
written it writes the build id at the end of the header. When read it
checks to see if there is a match between the current version and the
version in the cache. If not, it invalidates the cache which would
typically only occur during an ota update. Also remove blob cache
from the host build.
bug: 18262905
Change-Id: I753b1de1986703a4c1c8691b9d2bb533b2546143
2015-05-18 13:14:32 -07:00