diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2020-06-03 17:31:44 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2020-07-22 17:57:54 +0100 |
commit | ec388c16cd4217a64907e4e133d2102cc4fe608a (patch) | |
tree | b2843ad6885d24e75b5351487b008fe2598fa3d0 /include/ctf.h | |
parent | 67d4cc671b7b3c49f748546a510005333fcbc465 (diff) | |
download | gdb-ec388c16cd4217a64907e4e133d2102cc4fe608a.zip gdb-ec388c16cd4217a64907e4e133d2102cc4fe608a.tar.gz gdb-ec388c16cd4217a64907e4e133d2102cc4fe608a.tar.bz2 |
libctf: error out on corrupt CTF with invalid header flags
If corrupt CTF with invalid header flags is passed in, return the new
error ECTF_FLAGS.
include/
* ctf-api.h (ECTF_FLAGS): New.
(ECTF_NERR): Adjust.
* ctf.h (CTF_F_MAX): New.
libctf/
* ctf-open.c (ctf_bufopen_internal): Diagnose invalid flags.
Diffstat (limited to 'include/ctf.h')
-rw-r--r-- | include/ctf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ctf.h b/include/ctf.h index 168092b..f251759 100644 --- a/include/ctf.h +++ b/include/ctf.h @@ -199,7 +199,8 @@ typedef struct ctf_header #define CTF_VERSION_3 4 #define CTF_VERSION CTF_VERSION_3 /* Current version. */ -#define CTF_F_COMPRESS 0x1 /* Data buffer is compressed by libctf. */ +#define CTF_F_COMPRESS 0x1 /* Data buffer is compressed by libctf. */ +#define CTF_F_MAX CTF_F_COMPRESS /* The greatest flag value in use. */ typedef struct ctf_lblent { |