Commit Graph

24194 Commits

Author SHA1 Message Date
Martijn Coenen ade3876260 Merge changes from topic 'utf' am: 3a07e5bf94
am: aa7fd8a3ec

Change-Id: I3c90317d492a84ff99b18463d6f489e7b1cca61b
2016-08-25 20:24:14 +00:00
Martijn Coenen aa7fd8a3ec Merge changes from topic 'utf'
am: 3a07e5bf94

Change-Id: I4a1b0a32f4b2895ce170ce3a7cf6a30dfeca118f
2016-08-25 20:18:18 +00:00
Martijn Coenen 3a07e5bf94 Merge changes from topic 'utf'
* changes:
  libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
  Unicode: specify destination length in utf8_to_utf16 methods
2016-08-25 20:08:14 +00:00
Sergio Giro 1cfa56d46c libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

Test: ran libutils_tests
Bug: 29250543
Change-Id: I6115e3357141ed245c63c6eb25fc0fd0a9a7a2bb
(cherry picked from commit c4966a363e)
2016-08-25 20:07:51 +00:00
Sergio Giro 9de6776321 Unicode: specify destination length in utf8_to_utf16 methods
String16(const char *utf8) now returns the empty string in case
a string ends halfway throw a utf8 character.

Bug: 29267949
Clean cherry-pick from 1dcc0c8239

Change-Id: I5223caa7d42f4582a982609a898a02043265c6d3
2016-08-25 19:57:06 +00:00
Josh Gao 87ff463d6e Merge changes I0ee130db,I33d356fd am: e461b37965
am: 59561a64b7

Change-Id: If05615e9e5e69bb496fa9eb3c49ba7f9f5a41c45
2016-08-25 02:06:55 +00:00
Josh Gao 59561a64b7 Merge changes I0ee130db,I33d356fd
am: e461b37965

Change-Id: I4a2fe8cec7db8db9b6f701dace34d76879b13e7e
2016-08-25 02:03:56 +00:00
Josh Gao e461b37965 Merge changes I0ee130db,I33d356fd
* changes:
  adb: remove unnecessary addr arguments to accept.
  adb: check our socketpair ends in our win32 emulation.
2016-08-25 01:59:23 +00:00
Hans Boehm 7dddf9433c Merge "Make RefBase more robust and debuggable" am: daac359be7
am: 7bf3d21fde

Change-Id: I643c4bd38062b80d382c50ed161f5440f35c1dd9
2016-08-24 23:49:14 +00:00
Hans Boehm 7bf3d21fde Merge "Make RefBase more robust and debuggable"
am: daac359be7

Change-Id: I9844b2260b607987c688869c643560d5b9c92d75
2016-08-24 23:46:16 +00:00
Hans Boehm daac359be7 Merge "Make RefBase more robust and debuggable" 2016-08-24 23:36:13 +00:00
Josh Gao 78e1eb1949 adb: remove unnecessary addr arguments to accept.
Follow up to https://android-review.googlesource.com/#/c/261412/

Change-Id: I0ee130db302940f3224cc823a26b02fc45da0fca
Test: mma
2016-08-24 13:06:06 -07:00
Josh Gao 5990191c4e adb: check our socketpair ends in our win32 emulation.
In our Win32 socketpair emulation, check that the ends are properly
connected before returning.

Change-Id: I33d356fd9ebcac89fc6a89a5200e926032220383
Test: no additional failing tests in adb_test.exe
2016-08-24 13:06:06 -07:00
Mark Salyzyn ed421af68d Merge "liblog: add __android_log_close()" am: 812d1c7ea2
am: 6322efe522

Change-Id: Ib61d4ec5102fcfb12c48250c019fcdf019c2ffc5
2016-08-24 16:07:39 +00:00
Mark Salyzyn 098b5887c6 Merge "logger: validate hdr_size field in logger entry" am: fcf7ab8b1b
am: 2d562c9dce

Change-Id: I5721e8614079a04c2dc364304d0ffed10d74be90
2016-08-24 16:07:38 +00:00
Mark Salyzyn 6322efe522 Merge "liblog: add __android_log_close()"
am: 812d1c7ea2

Change-Id: I2ba5ed22e78564a864bab6b550b6d2bd2609a629
2016-08-24 16:05:05 +00:00
Mark Salyzyn 2d562c9dce Merge "logger: validate hdr_size field in logger entry"
am: fcf7ab8b1b

Change-Id: Ic88fe616256ab4949040771d3bed1dfb823ab981
2016-08-24 16:05:04 +00:00
Treehugger Robot 812d1c7ea2 Merge "liblog: add __android_log_close()" 2016-08-24 15:58:48 +00:00
Treehugger Robot fcf7ab8b1b Merge "logger: validate hdr_size field in logger entry" 2016-08-24 15:56:23 +00:00
Mark Salyzyn da07f7880c Merge "libcutils: Add ashmem_valid() function" am: d00c7470ea
am: 8b1f7b595c

Change-Id: I1be0fc5d74c609ec42578c29c7af9d897708f8c6
2016-08-24 15:51:08 +00:00
Mark Salyzyn 8b1f7b595c Merge "libcutils: Add ashmem_valid() function"
am: d00c7470ea

Change-Id: Ib09d3ee7bb131c30f59ea273f357c045394206fb
2016-08-24 15:48:55 +00:00
Treehugger Robot d00c7470ea Merge "libcutils: Add ashmem_valid() function" 2016-08-24 15:39:06 +00:00
Elliott Hughes 66e5e2432a Merge "Most accept/accept4 calls in system/core don't actually want the remote address." am: 299d64144b
am: 8615d79d85

Change-Id: I89aeabf6efa8217c9acd3f8a766bbd18f7e994fa
2016-08-23 23:05:59 +00:00
Elliott Hughes 8615d79d85 Merge "Most accept/accept4 calls in system/core don't actually want the remote address."
am: 299d64144b

Change-Id: I3fb9678dfed08f0b1d6e90e547ecae6cdcabc9a1
2016-08-23 23:03:20 +00:00
Treehugger Robot 299d64144b Merge "Most accept/accept4 calls in system/core don't actually want the remote address." 2016-08-23 22:48:24 +00:00
Mark Salyzyn ee431112ff libcutils: Add ashmem_valid() function
Bug: 30310689
Change-Id: I14c52c5d52745a725799652b87c86281ac214899
2016-08-23 15:29:28 -07:00
Mark Salyzyn df7a4c6bae liblog: add __android_log_close()
Bug: 30963384
Change-Id: I901e6ac2cc3c601bbecc2d64e00a98e2ab448210
2016-08-23 15:25:03 -07:00
Mark Salyzyn 305374cf0f logger: validate hdr_size field in logger entry
- check hdr_size to make sure it is in the expected range
  from sizeof entry_v1 to entry (entry_v4).
- alter msg() method to report NULL on invalid hdr_size
- alter all users of msg() method.

Bug: 30947841
Change-Id: I9bc1740d7aa9f37df5be966c18de1fb9de63d5dd
2016-08-23 14:51:50 -07:00
Josh Gao c8146aa39f Merge "debuggerd: don't display fault addr for manually sent signals." am: ad52cbb9ec
am: 504d4ccd7c

Change-Id: Iac8f64e01b5dd3fa9ab6e34c2c151800142ccc69
2016-08-23 21:24:53 +00:00
Josh Gao 504d4ccd7c Merge "debuggerd: don't display fault addr for manually sent signals."
am: ad52cbb9ec

Change-Id: I34284b398c32dbdfe2074d44d316f81fc45deee8
2016-08-23 21:23:15 +00:00
Treehugger Robot ad52cbb9ec Merge "debuggerd: don't display fault addr for manually sent signals." 2016-08-23 21:03:18 +00:00
Elliott Hughes 50a99aa6cb Merge "debuggerd: set SOCK_NONBLOCK in accept rather than later." am: 82b67fff06
am: 0d2ef3dc86

Change-Id: Ie8ae5707455f4d1741ca87ef515ea9a142e05aa5
2016-08-23 20:10:01 +00:00
Elliott Hughes 0d2ef3dc86 Merge "debuggerd: set SOCK_NONBLOCK in accept rather than later."
am: 82b67fff06

Change-Id: I6f2e72a4847fbfac8e1ba78321be7e026f7629bd
2016-08-23 20:05:48 +00:00
Elliott Hughes 3dcfa3fb1c Most accept/accept4 calls in system/core don't actually want the remote address.
So don't write the extra code for it or waste the kernel's time
copying it around.

Change-Id: I93de64064c2d4fe58ba5b5322cfa69bf31a76dad
2016-08-23 12:50:00 -07:00
Elliott Hughes 82b67fff06 Merge "debuggerd: set SOCK_NONBLOCK in accept rather than later." 2016-08-23 19:35:54 +00:00
Josh Gao 344ca5a681 debuggerd: don't display fault addr for manually sent signals.
Bug: http://b/30819045
Change-Id: Ic8ab21298dcba6acdfa876e7c729b14b0bf2afbb
Test: `killall -TRAP surfaceflinger` no longer shows fault addr,
      crasher still does
2016-08-23 12:31:14 -07:00
Daniel Rosenberg 852a4c761d resolve merge conflicts of 40eff95 to stage-aosp-master
am: 559cc01e3e

Change-Id: Ief493c828bc7e03967a2bb5d439a7a4fd638a253
2016-08-23 04:32:30 +00:00
Daniel Rosenberg 559cc01e3e resolve merge conflicts of 40eff95 to stage-aosp-master
Change-Id: I91935ba9603ffd41af2009adc13a024701619c52
2016-08-22 20:13:52 -07:00
Daniel Rosenberg 40eff9534e Merge changes I9f380f31,Ieab6bed7,Ia870e4be,I939b1e01,I8b723dda
* changes:
  Add skip-secondary flag
  Switch fastboot to new A/B spec
  Add Fastboot support for flashing secondary images
  Handle invalid suffix lists
  Call set_active after flashall and update
2016-08-23 02:18:33 +00:00
Elliott Hughes 694b4880d8 Merge "liblog: use SOCK_NONBLOCK directly." am: fca43d3ec5
am: 33f8c194f9

Change-Id: I742833b2933d1ab17543839f9749a7c4d7f13944
2016-08-23 01:23:29 +00:00
Elliott Hughes 33f8c194f9 Merge "liblog: use SOCK_NONBLOCK directly."
am: fca43d3ec5

Change-Id: I4d959d9091adbf8bf2d7b68653a3c6064893a65a
2016-08-23 01:20:36 +00:00
Josh Gao a2408aaf2f Merge "adb: increase the authentication throttling limit." am: 393e5258f6
am: e4d79532de

Change-Id: I4a0b0700cdee5f3b0e1577132080860402318851
2016-08-23 01:18:03 +00:00
Josh Gao e4d79532de Merge "adb: increase the authentication throttling limit."
am: 393e5258f6

Change-Id: I483cf75ced8d9fb896c2f5e417d258970d7cabb1
2016-08-23 01:11:28 +00:00
Treehugger Robot fca43d3ec5 Merge "liblog: use SOCK_NONBLOCK directly." 2016-08-23 01:08:18 +00:00
Treehugger Robot 393e5258f6 Merge "adb: increase the authentication throttling limit." 2016-08-23 00:12:52 +00:00
Elliott Hughes 5ba3003467 liblog: use SOCK_NONBLOCK directly.
No need to have a race, even if it doesn't matter.

Change-Id: Ia79f2633643bc63618de0fd85953b3226415484f
2016-08-22 16:19:58 -07:00
Josh Gao 7f3a776ac4 Merge changes I9761298a,I8d3312b2 am: 0b4fcb75d4
am: 8270912ed0

Change-Id: I4eafebc37f15f817ac2fa035a03e0aae90aa6fb0
2016-08-22 21:42:33 +00:00
Josh Gao 8270912ed0 Merge changes I9761298a,I8d3312b2
am: 0b4fcb75d4

Change-Id: I330c467e408bc10ebdab0f5708d24d2297cf39a2
2016-08-22 21:38:53 +00:00
Treehugger Robot 0b4fcb75d4 Merge changes I9761298a,I8d3312b2
* changes:
  adb: fix public key authorization.
  adb: add support for vendor key directories.
2016-08-22 21:34:18 +00:00
Elliott Hughes 874c674c60 debuggerd: set SOCK_NONBLOCK in accept rather than later.
Change-Id: I95586984dd7aec798d75b150be238d5f6f7c91da
2016-08-22 14:17:25 -07:00