roleoroleo / onvif_simple_server

Light implementation of an onvif server intended for use in resource-constrained devices
GNU General Public License v3.0
35 stars 12 forks source link

Fixed realloc handling of input #6

Closed Sparpet closed 6 months ago

Sparpet commented 6 months ago

After realloc the memory address of the input buffer can change , if this happens, trying to access the input buffer causes a segmentation fault.

Added a line to update the pointer after realloc to avoid reading old address and avoid the issue.

roleoroleo commented 6 months ago

Thank you for your pr.