Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae8243c6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "trace: ipc_logging: Avoid buffer overflow in ipc_log_string()"

parents 33f41065 5c5b7982
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015,2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -507,7 +507,7 @@ int ipc_log_string(void *ilctxt, const char *fmt, ...)
	tsv_qtimer_write(&ectxt);
	avail_size = (MAX_MSG_SIZE - (ectxt.offset + hdr_size));
	va_start(arg_list, fmt);
	data_size = vsnprintf((ectxt.buff + ectxt.offset + hdr_size),
	data_size = vscnprintf((ectxt.buff + ectxt.offset + hdr_size),
				avail_size, fmt, arg_list);
	va_end(arg_list);
	tsv_write_header(&ectxt, TSV_TYPE_BYTE_ARRAY, data_size);