]> granicus.if.org Git - procps-ng/commitdiff
proc/version.h: Protect parameter in LINUX_VERSION() macro.
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)
Just in case (no problematic use case at the moment).

proc/version.h

index e4dcef4621d5c26a2d867e564d6cb1bc1c76bf24..5392b6c361e0d288585836e6d4284cfd964d3f69 100644 (file)
@@ -30,7 +30,7 @@ extern "C" {
 int procps_linux_version(void);
 
 /* Convenience macros for composing/decomposing version codes */
-#define LINUX_VERSION(x,y,z)   (0x10000*(x) + 0x100*(y) + z)
+#define LINUX_VERSION(x,y,z)   (0x10000*(x) + 0x100*(y) + (z))
 #define LINUX_VERSION_MAJOR(x) (((x)>>16) & 0xFF)
 #define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF)
 #define LINUX_VERSION_PATCH(x) ( (x)      & 0xFF)