af98efbd15878fbd97fd3ef3c413d739ed9589e9 |
|
02-Apr-2015 |
Elliott Hughes <enh@google.com> |
Move all libcutils tests into the gtests. This also fixes the bug where we were always testing against the fake strlcpy we provide for glibc/Windows rather than the Android one. This also removes some unnecessary library dependencies. This also builds all the cutils tests for the host (static and dynamic). Change-Id: Icd129d5b025c0ca801be5acf31a54ecd88608df9
/system/core/libcutils/str_parms.c
|
b8f86480a28b8a57628383a49d7fc63a4f1d5971 |
|
02-May-2014 |
Mark Salyzyn <salyzyn@google.com> |
am a0a461d3: am 82e1b89f: am a32e01d2: Merge "libcutils: turn on -Werror" * commit 'a0a461d3b7d85484c10db64f078427a5be3da189': libcutils: turn on -Werror
|
12717169a51335f4b20b7c78a63b9ab66a81a366 |
|
30-Apr-2014 |
Mark Salyzyn <salyzyn@google.com> |
libcutils: turn on -Werror - Deal with some -Wunused / -Wunused-variable issues Change-Id: I28c23fb213382a392ec30935749fb359e072d664
/system/core/libcutils/str_parms.c
|
0693c5848d1af5c21af171f7e98fedfc24b6afb9 |
|
04-Apr-2014 |
Elliott Hughes <enh@google.com> |
am 4fe18615: am 56d57e88: am 5f130216: Merge "Handle errno properly to avoid corrupt str_parms" * commit '4fe186159386a75ce17ca0b7ba6ace4294187cb2': Handle errno properly to avoid corrupt str_parms
|
d3c8d5b8d4ade074129b65199a8048c81089ee0e |
|
06-Mar-2014 |
Jens Gulin <jens.gulin@sonymobile.com> |
Handle errno properly to avoid corrupt str_parms A normal sequence of calls is as follows: str_parms_create_str, str_parms_add_str, str_parms_destroy. In some cases the destroy caused double free. str_parms_add_str will clone the input and send it to hashmapPut for storage. If hashmapPut did not store the strings it will raise errno = ENOMEM and leave caller with ownership of the strings. In any of these cases it will be safe to destroy the str_parms. But what if it wasn't hashmapPut that said NOMEM? What if there was a stale NOMEM already before a successful hashmapPut? In that case the strings will be successfully added to the list (if new), but when str_parms_add_str sees the NOMEM it will free them anyway, leaving dangling pointers in the str_parms!! It is the responsibility of the caller to clear errno before any interesting call. This patch makes sure that str_parms_add_str reacts only on errno emmitted from hashmapPut. Change-Id: If87e4bcc482f09e1c66133d33517b152ebdac65f
/system/core/libcutils/str_parms.c
|
55c640704152694dca1f19bf2a0b86fa2efa99d1 |
|
20-Dec-2013 |
Paul McLean <pmclean@google.com> |
Adding a handy predicate function (str_parms_has_key() Change-Id: I1af5c260a1a820b65f0850ea9adb38b01fcb183c
/system/core/libcutils/str_parms.c
|
b957baccd21ca43371dfbc02c10aae18497000b8 |
|
22-Nov-2013 |
Mark Salyzyn <salyzyn@google.com> |
libcutils: bug str_parms.c:str_parms_get_float(). str_parms_get_float did not return the output into *val. Only output if returning with no error. Audit shows no internal users of this library function (cherry picked from commit 8e71ddeac00d0733c7fcc2965d69f07aa5c5d0a3) Change-Id: I14a3f08a098072a159dd93f85ead36b3f445816f
/system/core/libcutils/str_parms.c
|
2b94cc264f54fb588a8721caf92fff95b7576f4a |
|
22-Nov-2013 |
Mark Salyzyn <salyzyn@google.com> |
libcutils: UNUSED argument warnings (cherry picked from commit ba02cd1e9bccee9b112ccbee06bc204381b5a215) Change-Id: Ie427d481298af8d911bb2b157ebba30954335354
/system/core/libcutils/str_parms.c
|
8e71ddeac00d0733c7fcc2965d69f07aa5c5d0a3 |
|
22-Nov-2013 |
Mark Salyzyn <salyzyn@google.com> |
libcutils: bug str_parms.c:str_parms_get_float(). str_parms_get_float did not return the output into *val. Only output if returning with no error. Audit shows no internal users of this library function Change-Id: I14a3f08a098072a159dd93f85ead36b3f445816f
/system/core/libcutils/str_parms.c
|
ba02cd1e9bccee9b112ccbee06bc204381b5a215 |
|
22-Nov-2013 |
Mark Salyzyn <salyzyn@google.com> |
libcutils: UNUSED argument warnings Change-Id: Ie427d481298af8d911bb2b157ebba30954335354
/system/core/libcutils/str_parms.c
|
efd7501d535fb165792013763027cf50a5b37e08 |
|
15-Mar-2012 |
Dima Zavin <dima@android.com> |
cutils: str_parms: when deleting entry, need to also remove key When removing one entry, we can't just remove it from the map since key will not be freed. So, instead, search through the map for the key and free it once it is found. Change-Id: Id745c166a4acc5ea25f6d6cdbfe4f8fbc21cbbb3 Reported-by: Xin Qian <xqian@marvell.com> Signed-off-by: Dima Zavin <dima@android.com>
/system/core/libcutils/str_parms.c
|
86bfbe3cae1f5e480ba9756ec7404fa4d5a7f2c9 |
|
15-Mar-2012 |
Dima Zavin <dima@android.com> |
cutils: str_parms: free the key if the value was replaced during create/add Change-Id: I9f31da62f10f78ed11693a7c04e2be29b0790c93 Reported-by: Xin Qian <xqian@marvell.com> Signed-off-by: Dima Zavin <dima@android.com>
/system/core/libcutils/str_parms.c
|
a603e40f9efa0239ea18c9e98a0ae0f437c057f1 |
|
12-Mar-2012 |
Dima Zavin <dima@android.com> |
cutils: str_parms: test str_parms_add_str too Change-Id: I93f0e577aff6b8ff23a44e29f9942a26545b6dc8 Signed-off-by: Dima Zavin <dima@android.com>
/system/core/libcutils/str_parms.c
|
70b93034f3ce06404e9b042c80759da25dac99d8 |
|
12-Mar-2012 |
Dima Zavin <dima@android.com> |
cutils: str_parms: need to also dup the key when adding to hash Change-Id: Iabdd2061cbc36c6f4d4eb6e46bd757b5b52e0027 Signed-off-by: Dima Zavin <dima@android.com>
/system/core/libcutils/str_parms.c
|
fe71a61e5b0cb666675900d206251a7c18ed944b |
|
04-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE Bug: 5449033 Change-Id: I4951baa981f09a84ce483e3d1bd0f9ebe009035f
/system/core/libcutils/str_parms.c
|
69f4cd7f5add7a7c7f5915e5292aab7eb2a42e9f |
|
20-Oct-2011 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE Bug: 5449033 Change-Id: Ib453f869977a6e909095a578bbf0420851f887d2
/system/core/libcutils/str_parms.c
|
0fad7d023f0229f763a58dd479f78397322baa6d |
|
24-Mar-2011 |
Dima Zavin <dima@android.com> |
libcutils: add a simple string parameter parsing ("a=b;c=d;") helper utils Change-Id: Ifabeb75550fa6e351434e6e6d036b19331daf6c1 Signed-off-by: Dima Zavin <dima@android.com>
/system/core/libcutils/str_parms.c
|