1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

dist/tools: fix tunslip6 strncat num param

Cppcheck was (correctly) warning here that concat to strings might
result in buffer overflow because the terminating `\0` was not considered.
This is fixed here, making the cppcheck suppression also obsolete.
This commit is contained in:
smlng 2018-09-21 10:39:22 +02:00
parent 3f811c44db
commit d7942cd974

View File

@ -651,7 +651,7 @@ devopen(const char *dev, int flags)
char t[1024];
strcpy(t, "/dev/");
/* cppcheck-suppress bufferAccessOutOfBounds
* reason: seems to be a cppcheck bug */
* (reason: seems to be a bug in cppcheck 1.7x) */
strncat(t, dev, sizeof(t) - 5);
return open(t, flags);
}