libsysdecode: account for invalid protection flags

Reported by:	jhb
MFC with:	r368022
This commit is contained in:
kaktus 2020-11-26 09:07:45 +00:00
parent 6db1a3e809
commit 09e24ed8a6

View File

@ -662,7 +662,7 @@ sysdecode_mmap_prot(FILE *fp, int prot, int *rem)
printed = false;
protm = PROT_MAX_EXTRACT(prot);
prot = PROT_EXTRACT(prot);
prot &= ~PROT_MAX(protm);
if (protm != 0) {
fputs("PROT_MAX(", fp);
printed = print_mask_int(fp, mmapprot, protm, rem);