]> granicus.if.org Git - procps-ng/commit
0039-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>
Sat, 9 Jun 2018 11:35:19 +0000 (21:35 +1000)
commit0e365c8930b3aa690517f987f28bbdf203e45767
tree3101ff30c981bc50e0738ad0a8297d85d9ac6dee
parenta3111efa7159107ce9f9b76157db558dc79fd4e6
0039-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