Skip to content

Commit eecaa35

Browse files
committed
exmdb_provider: fix inconsistent skip over UTF8LEN_MARKER when reading from v1z content files
Fixes: gromox-1.35-13-g48e8b7520 References: GXF-746, DESK-763
1 parent 57cf143 commit eecaa35

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

exch/exmdb/instance.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,11 @@ void *instance_read_cid_content(const char *cid, uint32_t *plen, uint32_t tag) t
655655
errno = gx_decompress_file(cu_cid_path(nullptr, cid, 1).c_str(), dxbin,
656656
common_util_alloc, [](void *, size_t z) { return common_util_alloc(z); });
657657
if (errno == 0) {
658+
if (dxbin.cb < 4)
659+
return nullptr;
658660
if (plen != nullptr)
659-
*plen = dxbin.cb;
660-
return dxbin.pv;
661+
*plen = dxbin.cb - 4;
662+
return dxbin.pb + 4;
661663
} else if (errno != ENOENT) {
662664
return nullptr;
663665
}

0 commit comments

Comments
 (0)