pico-extras icon indicating copy to clipboard operation
pico-extras copied to clipboard

NULL pointer dereference in scanvideo_begin_scanline_generation

Open Memotech-Bill opened this issue 4 years ago • 2 comments

If:

  • routine scanvideo_begin_scanline_generation is called with block = false,
  • there are no available buffers on shared_state.free_list.free_list
  • and PICO_SCANVIDEO_LINKED_SCANLINE_BUFFERS is true

then at line 1092 of scanvideo,c:

  • the variable fsb is NULL
  • and is dereferenced.

This line should probably be moved up to line 1081.

Memotech-Bill avatar Apr 09 '21 20:04 Memotech-Bill

ha, yes i've definitely never tried that :-)

kilograham avatar Apr 10 '21 01:04 kilograham

I haven't tried it either :)

I don't even know what PICO_SCANVIDEO_LINKED_SCANLINE_BUFFERS is for. I am just reading through the code, trying to understand it, and spotted that.

Memotech-Bill avatar Apr 10 '21 06:04 Memotech-Bill