diff options
Diffstat (limited to 'firmware/logf.c')
-rw-r--r-- | firmware/logf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/logf.c b/firmware/logf.c index a704ad2d67..6e3e532450 100644 --- a/firmware/logf.c +++ b/firmware/logf.c | |||
@@ -145,7 +145,7 @@ void _logf(const char *format, ...) | |||
145 | while(len > MAX_LOGF_ENTRY) | 145 | while(len > MAX_LOGF_ENTRY) |
146 | { | 146 | { |
147 | ptr = logfbuffer[logfindex]; | 147 | ptr = logfbuffer[logfindex]; |
148 | strncpy(ptr, buf + tlen, MAX_LOGF_ENTRY-1); | 148 | strlcpy(ptr, buf + tlen, MAX_LOGF_ENTRY); |
149 | ptr[MAX_LOGF_ENTRY] = LOGF_TERMINATE_CONTINUE_LINE; | 149 | ptr[MAX_LOGF_ENTRY] = LOGF_TERMINATE_CONTINUE_LINE; |
150 | logfindex++; | 150 | logfindex++; |
151 | check_logfindex(); | 151 | check_logfindex(); |