summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPawel Biernacki <kaktus@FreeBSD.org>2020-11-25 16:30:57 +0000
committerPawel Biernacki <kaktus@FreeBSD.org>2020-11-25 16:30:57 +0000
commit4cbec4439713c3b4cfcbbe36ff40d5e4fa57492f (patch)
treef5b22995e7e9b628c65ba676799a9828ca641cf8 /lib
parentddd30dd82b5e6eee3d073a1f5987a11c44ed9e7c (diff)
downloadsrc-test2-4cbec4439713c3b4cfcbbe36ff40d5e4fa57492f.tar.gz
src-test2-4cbec4439713c3b4cfcbbe36ff40d5e4fa57492f.zip
libsysdecode: correctly decode mmap flags
r352913 added decoding of mmap PROT_MAX()'d flags but didn’t account for the case where different values were specified for PROT_MAX and regular flags. Fix it. Submitted by: sigsys_gmail.com Reported by: sigsys_gmail.com MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D27312
Notes
Notes: svn path=/head/; revision=368022
Diffstat (limited to 'lib')
-rw-r--r--lib/libsysdecode/flags.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c
index 5ba197438452..604303a0cbd4 100644
--- a/lib/libsysdecode/flags.c
+++ b/lib/libsysdecode/flags.c
@@ -662,11 +662,11 @@ sysdecode_mmap_prot(FILE *fp, int prot, int *rem)
printed = false;
protm = PROT_MAX_EXTRACT(prot);
+ prot = PROT_EXTRACT(prot);
if (protm != 0) {
fputs("PROT_MAX(", fp);
printed = print_mask_int(fp, mmapprot, protm, rem);
fputs(")|", fp);
- prot = protm;
}
return (print_mask_int(fp, mmapprot, prot, rem) || printed);
}