rockcarry / ffjpeg

a simple jpeg codec.
GNU General Public License v3.0
106 stars 46 forks source link

exit program when bmp file is oversize #48

Closed Marsman1996 closed 2 years ago

Marsman1996 commented 2 years ago

fix issue #47

When bmp's size is out of range, it returns without assign memory buffer to pb->pdata and did not exit the program. So the program crashes when it tries to access the pb->data in jfif.c:763, which is a invalid memory address. https://github.com/rockcarry/ffjpeg/blob/d5cfd49f304e2b8eafc0d473d1c217b1c761243b/src/jfif.c#L757-L763

Marsman1996 commented 2 years ago

log added