]> granicus.if.org Git - procps-ng/commit
proc/devname.c: Never write more than "chop" characters.
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Fri, 18 May 2018 21:32:21 +0000 (07:32 +1000)
commit6b7ceb36a47ce148f4dd2f4e63c717c8593f0cea
tree802c03f336fa33f03ba775d7105adcf9deb51eec
parent730bdc33e79ce8593252a6c950c549c38144909b
proc/devname.c: Never write more than "chop" characters.

This should be guaranteed by "tmp[chop] = '\0';" and "if(!c) break;" but
this patch adds a very easy belt-and-suspenders check.
proc/devname.c