Skip to content

Commit 5c782c1

Browse files
Fix partial_data_len=0 case
1 parent 316b075 commit 5c782c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/handler/lib/stream_preimage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int call_stream_preimage(dispatcher_context_t *dispatcher_context,
3636
}
3737
uint32_t preimage_len = (uint32_t) preimage_len_u64;
3838

39-
if (preimage_len < 1) {
39+
if (preimage_len < 1 || partial_data_len == 0) {
4040
// at least the initial 0x00 prefix should be there
4141
return -3;
4242
}

0 commit comments

Comments
 (0)