summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaya Sugiura <ssugiura@jp.adit-jv.com>2020-06-16 18:35:36 +0900
committerSaya Sugiura <ssugiura@jp.adit-jv.com>2020-06-16 18:35:36 +0900
commitb78e224da4e54a0a5208068f43b80c2afa2e6646 (patch)
tree587c7584c71b9f5da51b486ba0e6f0fd656a0a30
parent55b15218018b98960485e5007a77135f14a2af3a (diff)
downloadDLT-daemon-b78e224da4e54a0a5208068f43b80c2afa2e6646.tar.gz
Revert "dlt_common: Fix buffer overflow in dlt_buffer_get (#215)"
This reverts commit e420ee62d89d5efab6ad7275910cb3eec8497da6.
-rw-r--r--src/shared/dlt_common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c
index 4ae0924..e046cc4 100644
--- a/src/shared/dlt_common.c
+++ b/src/shared/dlt_common.c
@@ -2643,13 +2643,11 @@ int dlt_buffer_get(DltBuffer *buf, unsigned char *data, int max_size, int delete
}
/* third check size */
- if (max_size && (head.size > max_size)) {
+ if (max_size && (head.size > max_size))
dlt_vlog(LOG_WARNING,
"%s: Buffer: Max size is smaller than read header size. Max size: %d\n",
__func__, max_size);
- /* prevent buffer overflow on dlt_buffer_read_block */
- return DLT_RETURN_ERROR; /* ERROR */
- }
+ /* nothing to do but data does not fit provided buffer */
if ((data != NULL) && max_size) {