Changeset f3df25b6 in rtems for cpukit/libmisc

Timestamp:
10/05/20 14:49:14 (4 years ago)
Author:
Frank Kühndel <frank.kuehndel@…>
Branches:
master
Children:
a479686
Parents:
4763ef8
git-author:
Frank Kühndel <frank.kuehndel@…> (10/05/20 14:49:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/12/20 06:46:48)
Message:

cpukit/libmisc/monitor: Fix an illegal string copy

This is actually an illegal use of strcpy() because one is not allowed to
use this function with overlapping source and destination buffers; whereas
memmove() is explicitly designed to handle such cases.

The compiler warning was:

../../../cpukit/libmisc/monitor/mon-editor.c:342:15: warning:
'strcpy' accessing 1 byte at offsets [0, 75] and [0, 75] overlaps
1 byte at offset [0, 74] [-Wrestrict]

(No files)

Note: See TracChangeset for help on using the changeset viewer.