chiark / gitweb /
remove buffer-overrun risk in readlink call
authorMathias Nyman <mathias.nyman@nokia.com>
Wed, 21 Apr 2010 10:52:52 +0000 (13:52 +0300)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 21 Apr 2010 11:41:14 +0000 (13:41 +0200)
commite925018786d85fb3aed3b62a0a89309f9a7d5e4f
tree9c892c1012241c61d354bb39d28c1c1588a38184
parentc51d2f2746a54c8418965f22d1882b1ac3a18ed8
remove buffer-overrun risk in readlink call

readlink does not write a nul character to the end of the
string it returns. Therefore ask for one fewer character
than the buffer size so there's always room for an extra \0.

Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
udev/udev-node.c