libsysdecode: account for invalid protection flags

Reported by:	jhb
MFC with:	r368022
This commit is contained in:
Pawel Biernacki 2020-11-26 09:07:45 +00:00
parent c0c2345432
commit 569da02b0c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368053

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);