diff options
author | Muhammad Qureshi <muhammadq@google.com> | 2020-06-08 18:42:45 -0700 |
---|---|---|
committer | Muhammad Qureshi <muhammadq@google.com> | 2020-06-09 20:12:42 -0700 |
commit | 9b9584b1a373630c5d6860a4aed436622fcd2c7f (patch) | |
tree | 47c7d3cf16cb1d4d3ffdcfdd68d6deff5cd78384 /libutils/Unicode.cpp | |
parent | 84db2e40e1fc3a9d2e5091845abb51a04ee95793 (diff) |
Increase size limit for pulled AStatsEvent
Increase AStatsEvent max byte size to 50 KB for pulled events.
All AStatsEvent instances are treated as pulled events unless
AStatsEvent_write() is called.
- Set the default max size to 50 KB
- The starting buffer size is still ~4 KB for pushed and pulled events.
- If a write would exceed the buffer bounds, double buffer size until
write fits or 50 KB limit is exceeded in which case the overflow bit is
set to true.
- If AStatsEvent_write() is called, max size is set to ~4 KB. And if
the current payload exceeds this limit, set overflow bit to true.
- Fix error mask checking in stats_event_test.
- Set ERROR_NO_ATOM_ID when atom id is missing.
- Make sure tests don't hit ERROR_TOO_MANY_FIELDS when testing buffer
overflow.
- Rename event->size to event->numBytesWritten
Fixes: 158214941
Test: libstatssocket_test
Change-Id: Ia26aeb775f7e4f2ffe87707bab6d0119e21da10e
Diffstat (limited to 'libutils/Unicode.cpp')
0 files changed, 0 insertions, 0 deletions