Skip to content

Commit 85f5cbd

Browse files
committed
oplist: Fix another OOB read
Credit to OSS-Fuzz
1 parent f31ab38 commit 85f5cbd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(<

src/oplist.c

+7
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,13 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
715715
plist_free_data(data);
716716
goto err_out;
717717
}
718+
if (ctx->pos >= ctx->end) {
719+
byte_array_free(bytes);
720+
plist_free_data(data);
721+
PLIST_OSTEP_ERR("EOF while parsing data terminator '>' at offset %ld\n", ctx->pos - ctx->start);
722+
ctx->err++;
723+
goto err_out;
724+
}
718725
if (*ctx->pos != '>') {
719726
byte_array_free(bytes);
720727
plist_free_data(data);

0 commit comments

Comments
 (0)