Changeset daeb0a1 in rtems

Timestamp:
10/19/20 12:54:39 (4 years ago)
Author:
Frank Kühndel <frank.kuehndel@…>
Branches:
master
Children:
3fccdc95
Parents:
bb4e534
git-author:
Frank Kühndel <frank.kuehndel@…> (10/19/20 12:54:39)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/20/20 05:01:29)
Message:

rtems-fdt / shell - Fix string truncation warning

The compiler warning was:

../../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:267:5: warning:
'strncpy' specified bound depends on the length of the source argument

267 | strncpy(path, name, namelen);

| ~

It turns out that the strncpy() nor the buffer path is needed when
one uses strncmp() instead of strcmp(). This needs some change to
the algorithm but has the advantage that name is never truncated
to the size of the buffer path.

(No files)

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