diff options
author | Sam Nelson <sam.nelson@ti.com> | 2019-10-05 09:32:59 -0400 |
---|---|---|
committer | Sam Nelson <sam.nelson@ti.com> | 2019-10-08 15:50:39 -0400 |
commit | ba5e3e8f57ba7a7b4549ed22c9215bc83123520a (patch) | |
tree | 258351d8a7ebd1a81a24111ff401461b58581ef9 | |
parent | aab5b0256ba506b2ee146ce29933c32ceee71017 (diff) | |
download | ipc-ba5e3e8f57ba7a7b4549ed22c9215bc83123520a.tar.gz |
trace: Update to snprintf for robustness
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
-rw-r--r-- | packages/ti/trace/SysMin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/ti/trace/SysMin.c b/packages/ti/trace/SysMin.c index 6e0db82..0d93fc8 100644 --- a/packages/ti/trace/SysMin.c +++ b/packages/ti/trace/SysMin.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013, Texas Instruments Incorporated + * Copyright (c) 2011-2019, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -191,7 +191,7 @@ Void SysMin_putch(Char ch) uSec = Clock_getTicks() * (UInt64)Clock_tickPeriod; SysMin_output('['); if (uSec) { - sprintf(timeStamp, "%17llu\0", uSec); + snprintf(timeStamp, sizeof(timeStamp), "%17llu\0", uSec); } for (index = startIdx; index < endIdx; index++) { if (index == decPtIdx) { |