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
This commit is contained in:
parent
ddd30dd82b
commit
4cbec44397
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368022
@ -662,11 +662,11 @@ sysdecode_mmap_prot(FILE *fp, int prot, int *rem)
|
|||||||
|
|
||||||
printed = false;
|
printed = false;
|
||||||
protm = PROT_MAX_EXTRACT(prot);
|
protm = PROT_MAX_EXTRACT(prot);
|
||||||
|
prot = PROT_EXTRACT(prot);
|
||||||
if (protm != 0) {
|
if (protm != 0) {
|
||||||
fputs("PROT_MAX(", fp);
|
fputs("PROT_MAX(", fp);
|
||||||
printed = print_mask_int(fp, mmapprot, protm, rem);
|
printed = print_mask_int(fp, mmapprot, protm, rem);
|
||||||
fputs(")|", fp);
|
fputs(")|", fp);
|
||||||
prot = protm;
|
|
||||||
}
|
}
|
||||||
return (print_mask_int(fp, mmapprot, prot, rem) || printed);
|
return (print_mask_int(fp, mmapprot, prot, rem) || printed);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user