diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-05-22 11:16:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 11:16:37 +0300 |
commit | ef660efef1723f44b5636b3bdf35e1a250d47322 (patch) | |
tree | de8dfdedbea544a95ea7e5ac93cf05ca71ffd694 /exporting | |
parent | 5ce2c13b35610b9935267b1348021813c4064780 (diff) |
Fix buffer splitting in the Kinesis exporting connector (#9122)
Diffstat (limited to 'exporting')
-rw-r--r-- | exporting/aws_kinesis/aws_kinesis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exporting/aws_kinesis/aws_kinesis.c b/exporting/aws_kinesis/aws_kinesis.c index 938569a9eb..e8a9b540aa 100644 --- a/exporting/aws_kinesis/aws_kinesis.c +++ b/exporting/aws_kinesis/aws_kinesis.c @@ -108,7 +108,7 @@ void aws_kinesis_connector_worker(void *instance_p) record_len = buffer_len - sent; } else { record_len = KINESIS_RECORD_MAX - partition_key_len; - while (*(first_char + record_len) != '\n' && record_len) + while (record_len && *(first_char + record_len - 1) != '\n') record_len--; } char error_message[ERROR_LINE_MAX + 1] = ""; |