<feed xmlns='http://www.w3.org/2005/Atom'>
<title>replicant/core/libutils/VectorImpl.cpp, branch replicant-9</title>
<subtitle>Patches not merged yet, used for building and testing them
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/'/>
<entry>
<title>clean-up libutils includes</title>
<updated>2017-03-03T22:47:47+00:00</updated>
<author>
<name>Mathias Agopian</name>
<email>mathias@google.com</email>
</author>
<published>2017-02-28T23:06:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=22dbf3947fedf988e714a4703ddf85fc41413f90'/>
<id>22dbf3947fedf988e714a4703ddf85fc41413f90</id>
<content type='text'>
moved Foo.h as first include of Foo.cpp, and
removed redundant includes.

Made NativeHandle non virtual.


Test: run &amp; compile
Bug: n/a

Change-Id: I37fa746cd42c9ba23aba181f84cb6c619386406a</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
moved Foo.h as first include of Foo.cpp, and
removed redundant includes.

Made NativeHandle non virtual.


Test: run &amp; compile
Bug: n/a

Change-Id: I37fa746cd42c9ba23aba181f84cb6c619386406a</pre>
</div>
</content>
</entry>
<entry>
<title>liblog: use log/log.h when utilizing ALOG macros</title>
<updated>2017-01-11T17:31:15+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@google.com</email>
</author>
<published>2017-01-10T21:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=30f991f251940be3ed11566fb71139852286f68a'/>
<id>30f991f251940be3ed11566fb71139852286f68a</id>
<content type='text'>
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
</pre>
</div>
</content>
</entry>
<entry>
<title>system/core Replace cutils/log.h with android/log.h</title>
<updated>2016-09-30T19:47:05+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>salyzyn@google.com</email>
</author>
<published>2016-09-28T17:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=66ce3e08c5632a20ea66bde6dd76397041edf034'/>
<id>66ce3e08c5632a20ea66bde6dd76397041edf034</id>
<content type='text'>
Should use android/log.h instead of cutils/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Should use android/log.h instead of cutils/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
</pre>
</div>
</content>
</entry>
<entry>
<title>am f777655d: resolved conflicts for 6ee734cf to stage-aosp-master</title>
<updated>2015-09-23T17:15:12+00:00</updated>
<author>
<name>Sergio Giro</name>
<email>sgiro@google.com</email>
</author>
<published>2015-09-23T17:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=c565bdb67b801fe2b4965b44e53dccfd9097993c'/>
<id>c565bdb67b801fe2b4965b44e53dccfd9097993c</id>
<content type='text'>
* commit 'f777655d85af3aefa4a1683f289da1ec67988330':
  libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* commit 'f777655d85af3aefa4a1683f289da1ec67988330':
  libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
</pre>
</div>
</content>
</entry>
<entry>
<title>libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory</title>
<updated>2015-09-23T15:22:59+00:00</updated>
<author>
<name>Sergio Giro</name>
<email>sgiro@google.com</email>
</author>
<published>2015-09-23T15:22:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=d2529f28308ba7583f4d8baaa937218d81cbe8bd'/>
<id>d2529f28308ba7583f4d8baaa937218d81cbe8bd</id>
<content type='text'>
Some methods in header files of classes using SharedBuffer need
to be moved to the implementation files accordingly

Change-Id: I891f3ace2b940ab219e4e449040bfed71c0547db
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some methods in header files of classes using SharedBuffer need
to be moved to the implementation files accordingly

Change-Id: I891f3ace2b940ab219e4e449040bfed71c0547db
</pre>
</div>
</content>
</entry>
<entry>
<title>resolved conflicts for 32d86587 to mnc-dr-dev-plus-aosp</title>
<updated>2015-09-08T12:59:49+00:00</updated>
<author>
<name>Narayan Kamath</name>
<email>narayan@google.com</email>
</author>
<published>2015-09-08T12:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=51e740f802083cc250a2f6228222bcbbcec79887'/>
<id>51e740f802083cc250a2f6228222bcbbcec79887</id>
<content type='text'>
Change-Id: I381133e7dd93f908bd3d2b42e8af83d954e428af
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I381133e7dd93f908bd3d2b42e8af83d954e428af
</pre>
</div>
</content>
</entry>
<entry>
<title>libutils: Fix integer overflows in VectorImpl.</title>
<updated>2015-09-02T11:37:49+00:00</updated>
<author>
<name>Narayan Kamath</name>
<email>narayan@google.com</email>
</author>
<published>2015-08-28T11:59:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=c609c31fb56ae434caa2d0153cd0a2f74a715071'/>
<id>c609c31fb56ae434caa2d0153cd0a2f74a715071</id>
<content type='text'>
Use external/safe-iop to check for overflows on arithmetic
operations.

Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.

Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.

bug: 22953624

Change-Id: I46b1ae8ca1f3a010be13aca36a091e76a97a7b70
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use external/safe-iop to check for overflows on arithmetic
operations.

Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.

Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.

bug: 22953624

Change-Id: I46b1ae8ca1f3a010be13aca36a091e76a97a7b70
</pre>
</div>
</content>
</entry>
<entry>
<title>VectorImpl.cpp: fix benign multiplication overflow</title>
<updated>2015-08-28T13:40:23+00:00</updated>
<author>
<name>Nick Kralevich</name>
<email>nnk@google.com</email>
</author>
<published>2015-08-28T13:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=c76698f24e785a8984fa9d9d0bf8f81aa28746cc'/>
<id>c76698f24e785a8984fa9d9d0bf8f81aa28746cc</id>
<content type='text'>
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 &lt; 0.

Bug: 23607865
Change-Id: I14f6f6506645d582f7d67a2e2d60ead3cb18b957
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt; 0.

Bug: 23607865
Change-Id: I14f6f6506645d582f7d67a2e2d60ead3cb18b957
</pre>
</div>
</content>
</entry>
<entry>
<title>libutils: cleanups for -fsanitize=integer</title>
<updated>2015-08-24T15:52:22+00:00</updated>
<author>
<name>Nick Kralevich</name>
<email>nnk@google.com</email>
</author>
<published>2015-08-22T21:27:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=1f286989986a384e34d9de1acf8899439506695a'/>
<id>1f286989986a384e34d9de1acf8899439506695a</id>
<content type='text'>
* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>fix corruption in Vector&lt;&gt; when malloc falied</title>
<updated>2013-10-31T06:24:29+00:00</updated>
<author>
<name>Shuo Gao</name>
<email>shuo.gao@intel.com</email>
</author>
<published>2013-10-17T03:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=eb0eb4f79fca083009aa7a6b6e28ddcdbcbd1214'/>
<id>eb0eb4f79fca083009aa7a6b6e28ddcdbcbd1214</id>
<content type='text'>
1. When alloc or realloc failed in the function SharedBuffer::editResize,
it would return a NULL pointer, then mStorage would update to be 1 by
SharedBuffer::data() if no pointer check here, which is an obviously
wrong address, and would cause corruption when used it e.g. in capacity().

So add the pointer check here for the return value of SharedBuffer::editResize,
if it's NULL do not use it to update mStorage, to avoid the value of mStorage
polluted.

2. when alloc or realloc falied in _grow &amp; _shrink function, mStorage keep
the original value, so mCount should not be updated here.

Otherwise, mStorage might be 0 but mCount&gt;0, so a corruption would happend
when it try to delete items from the Vector since mCount&gt;0.

Change-Id: I7c3814e843c459834ca5eed392e8d63d1cb7d2d8
Signed-off-by: Shuo Gao &lt;shuo.gao@intel.com&gt;
Signed-off-by: Jian Luo &lt;jian.luo@intel.com&gt;
Signed-off-by: Bruce Beare &lt;bruce.j.beare@intel.com&gt;
Signed-off-by: Jack Ren &lt;jack.ren@intel.com&gt;
Author-tracking-BZ: 139626
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. When alloc or realloc failed in the function SharedBuffer::editResize,
it would return a NULL pointer, then mStorage would update to be 1 by
SharedBuffer::data() if no pointer check here, which is an obviously
wrong address, and would cause corruption when used it e.g. in capacity().

So add the pointer check here for the return value of SharedBuffer::editResize,
if it's NULL do not use it to update mStorage, to avoid the value of mStorage
polluted.

2. when alloc or realloc falied in _grow &amp; _shrink function, mStorage keep
the original value, so mCount should not be updated here.

Otherwise, mStorage might be 0 but mCount&gt;0, so a corruption would happend
when it try to delete items from the Vector since mCount&gt;0.

Change-Id: I7c3814e843c459834ca5eed392e8d63d1cb7d2d8
Signed-off-by: Shuo Gao &lt;shuo.gao@intel.com&gt;
Signed-off-by: Jian Luo &lt;jian.luo@intel.com&gt;
Signed-off-by: Bruce Beare &lt;bruce.j.beare@intel.com&gt;
Signed-off-by: Jack Ren &lt;jack.ren@intel.com&gt;
Author-tracking-BZ: 139626
</pre>
</div>
</content>
</entry>
</feed>
