summaryrefslogtreecommitdiffstats
path: root/libutils/String8.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8Sergio Giro2016-07-211-12/+13
| | | | | | | | | | | | | 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 c4966a363e46d2e1074d1a365e232af0dcedd6a1)
* am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile ↵Abhishek Arya2015-08-211-0/+3
|\ | | | | | | | | | | | | failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b * commit 'e45d96d6bf592f0ae20bb021ea529acc94e0cb55': Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
| * am cd407a17: am e0dce90b: Fix compile failure after ↵Abhishek Arya2015-08-211-0/+3
| |\ | | | | | | | | | | | | | | | | | | rIfe1dc0791040150132bea6884f1e6c8d31972d1b * commit 'cd407a17fe326f3e18866ddddb1c747b06a45fc0': Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
| | * Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1bAbhishek Arya2015-08-201-0/+3
| | | | | | | | | | | | | | | Bug: 23290056 Change-Id: If6e22b0159de6635a8ca5305895b7718f15becc7
* | | am e97682be: am a1a22b57: am e67b5848: am 4956c0fe: am 5b85b1d4: libutils: ↵Sergio Giro2015-08-201-0/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | fix overflow in String8::allocFromUTF8 * commit 'e97682be0634fe773f70097bc518e5d034efe8f7': libutils: fix overflow in String8::allocFromUTF8
| * | am 4956c0fe: am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8Sergio Giro2015-08-201-0/+3
| |\ \ | | |/ | | | | | | | | | * commit '4956c0fe1e582a8497aff34a41aeb8bf4748eef0': libutils: fix overflow in String8::allocFromUTF8
| | * libutils: fix overflow in String8::allocFromUTF8Sergio Giro2015-08-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch contributed in: https://code.google.com/p/android/issues/detail?id=182908 Bug: 23290056 (cherry picked from commit 4eeacbeec0ae66e9d9395abbf83666709f2e11e3) Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b (cherry picked from commit ebabef275283f771151ec93c17469374b789b2c8)
* | | System/core: Use memmoveAndreas Gampe2014-11-131-1/+1
|/ / | | | | | | | | | | Should use memmove when you expect overlap. Change-Id: I268a173db40a4be54232958e37aa8a03c2a885ee
* | Add a couple of useful string functions.Jeff Brown2014-06-091-0/+24
| | | | | | | | Change-Id: I158f69917bab5f15482dd8f2b66b36a4cc0f11ad
* | libutils: turn on -WerrorMark Salyzyn2014-06-021-1/+0
| | | | | | | | | | | | | | | | | | - Deal with some -Wunused issues - Override PRI macros (windows) - Revert use of PRI macros on off64_t (linux) - Deal with a gnu++11 complaince issue Change-Id: Ie66751293bd84477a5a6dfd8a57e700a16e36964
* | Fix undefined args access for x86_64.Fengwei Yin2014-02-271-2/+11
|/ | | | | | | | | | | | | | From libc manual for vsnprintf: The functions vprintf(), vfprintf(), vsprintf(), vsnprintf() are equivalent to the functions printf(), fprintf(), sprintf(), snprintf(), respectively, except that they are called with a va_list instead of a variable number of arguments. These functions do not call the va_end macro. Because they invoke the va_arg macro, the value of ap is undefined after the call. We need to allocate/end new va_list for each vsnprintf. Change-Id: I66ec058033be1cb918e7b2bc84ca546800da226b Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
* move libs/utils to libutilsAlex Ray2013-08-021-0/+640
Change-Id: I6cf4268599460791414882f91eeb88a992fbd29d