Skip to content

Commit 3087a41

Browse files
committed
dlt-user: fix invalid return in dlt_user_log_write_start_internal
dlt_user_log_write_start_internal might return OK when the buffer was not initalized, this can lead to other functions assuming that the buffer was setup correctly and thus access invalid memory. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
1 parent 603f0e4 commit 3087a41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/dlt_user.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,7 @@ DltReturnValue dlt_user_log_write_start_internal(DltContext *handle,
18381838
return DLT_RETURN_WRONG_PARAMETER;
18391839
} else if (ret == DLT_RETURN_LOGGING_DISABLED) {
18401840
log->handle = NULL;
1841-
return DLT_RETURN_OK;
1841+
return ret;
18421842
}
18431843

18441844
ret = dlt_user_log_write_start_init(handle, log, loglevel, is_verbose);

0 commit comments

Comments
 (0)