diff options
author | Craig Small <csmall@enc.com.au> | 2016-05-01 17:14:48 +1000 |
---|---|---|
committer | Craig Small <csmall@enc.com.au> | 2016-05-01 17:14:48 +1000 |
commit | 9abf7d879d07c140a265b9f8efb642fdb5bd06b3 (patch) | |
tree | ff09289135f46e92c71c641722cd5720ee470226 /doc | |
parent | 6b5cb345c5be6beeec74409657c8ebf9e8869d92 (diff) | |
download | procps-ng-9abf7d879d07c140a265b9f8efb642fdb5bd06b3.tar.gz |
library: protect against large version numbers.
Linux release numbers are x.y.z we assumed but never protected
against x> 0x7fff and y,z > 0xff before.
Linux release in 1991, 1 major release per 6 years so we're fine
until 7452, unless they do way too many minor rels (max being 39)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/procps_linux_version.3 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/procps_linux_version.3 b/doc/procps_linux_version.3 index 838854b..b284d13 100644 --- a/doc/procps_linux_version.3 +++ b/doc/procps_linux_version.3 @@ -16,7 +16,7 @@ .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" %%%LICENSE_END .\" -.TH PROCPS_LINUX_VERSION 3 2016-04-14 "libproc-2" +.TH PROCPS_LINUX_VERSION 3 2016-05-01 "libproc-2" .\" Please adjust this date whenever revising the manpage. .\" .SH NAME @@ -79,6 +79,15 @@ Contains the release version of the Linux kernel or proc filesystem. .B procps_linux_version() first appeared in libproc-2 version 0.0. +.SH BUGS +Due to the way the three numbers are encoded into a single integer, +.BR procps_linux_version () +and the associated macros assume 255 for the maximum value for the +minor and patch level and 32767 (hex 0x7fff) for the maximum value +for the major version. In other words, when Linux v 32768.0.0 comes +out, this function will break. +.\" Maj/6yr - In 7452 we'll think of something + .SH SEE ALSO .BR fopen (3), .BR proc (5). |