diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch b/import-layers/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch new file mode 100644 index 000000000..1c07eea3c --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch @@ -0,0 +1,51 @@ +Subject: restrict value range passed to isprint function + +According to C standards isprint argument shall be representable as an +unsigned char or be equal to EOF, otherwise the behaviour is undefined. + +Passing arbitrary ints leads to segfault in nm program from elfutils. + +Restrict isprint argument range to values representable by unsigned char. + +Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> + +Taken from buildroot + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- +Index: b/argp.h +=================================================================== +--- a/argp.h ++++ b/argp.h +@@ -23,6 +23,7 @@ + + #include <stdio.h> + #include <ctype.h> ++#include <limits.h> + + #define __need_error_t + #include <errno.h> +@@ -577,7 +578,7 @@ + else + { + int __key = __opt->key; +- return __key > 0 && isprint (__key); ++ return __key > 0 && __key <= UCHAR_MAX && isprint (__key); + } + } + +Index: b/argp-parse.c +=================================================================== +--- a/argp-parse.c ++++ b/argp-parse.c +@@ -1292,7 +1292,7 @@ + int __key = __opt->key; + /* FIXME: whether or not a particular key implies a short option + * ought not to be locale dependent. */ +- return __key > 0 && isprint (__key); ++ return __key > 0 && __key <= UCHAR_MAX && isprint (__key); + } + } + |