Skip to content

Commit

Permalink
Fixing heap corruption (IntelRealSense#8)
Browse files Browse the repository at this point in the history
TODO: Why parser.hpp is different from Mac OS version?
  • Loading branch information
dorodnic authored and abernste committed Aug 9, 2018
1 parent 6c00564 commit c77cc6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win7/winusb_uvc/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ uvc_error_t uvc_parse_vs_frame_frame(uvc_streaming_interface_t *stream_if,
frame->dwFrameIntervalStep = DW_TO_INT(&block[34]);
}
else {
frame->intervals = (uint32_t *)malloc(block[21] *sizeof(uint32_t));
frame->intervals = (uint32_t *)malloc((block[21] + 1) *sizeof(uint32_t));
p = &block[26];

for (i = 0; i < block[21]; ++i) {
Expand Down

0 comments on commit c77cc6b

Please sign in to comment.