Skip to content

Commit 40eae28

Browse files
committed
mapi_lib: properly trim unimplemented EPV_FAR-encoded properties
Fixes: gromox-2.11-54-gbe2b050b5
1 parent a68f1f9 commit 40eae28

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/edb_pack.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ enum { /* encodings for EDB property values */
5252
EPV_BINARY_0 = 0x50,
5353
EPV_BINARY_1 = 0x51,
5454
EPV_BINARY_2 = 0x52,
55-
/* If the PV is >=2049 bytes, it gets replaced. */
55+
/* If the propval is >=2049 bytes, it gets replaced. */
5656
EPV_NEAR = 0x78,
5757
EPV_FAR = 0x7a,
5858
/*
@@ -463,13 +463,14 @@ pack_result edb_pull::g_edb_propval_a(TPROPVAL_ARRAY *r)
463463
r->ppropval[i].proptag = PROP_TAG(PR_NULL, PT_NULL);
464464
filter = true;
465465
} else if (proc.active) {
466+
/* e.g. EPV_FAR not implemented yet, so strip */
466467
r->ppropval[i].proptag = CHANGE_PROP_TYPE(r->ppropval[i].proptag, PT_NULL);
467468
filter = true;
468469
}
469470
}
470471
if (filter) {
471472
auto m = std::remove_if(&r->ppropval[0], &r->ppropval[r->count],
472-
[](const TAGGED_PROPVAL &tp) { return PROP_ID(tp.proptag) == PROP_ID(PR_NULL); });
473+
[](const TAGGED_PROPVAL &tp) { return PROP_TYPE(tp.proptag) == PT_NULL; });
473474
r->count = m - &r->ppropval[0];
474475
}
475476
return pack_result::ok;

0 commit comments

Comments
 (0)