Fix ASAN issue: heap-use-after-free 08/287908/1
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 7 Feb 2023 11:51:38 +0000 (20:51 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 7 Feb 2023 11:51:38 +0000 (20:51 +0900)
commit5564d5909a465fa57f6339993ffdc35273f471da
tree7f4c5bfc0319e23cd0ec9f01d3198ac56310460d
parentb516d6c4ce549186a5cb5ca4c025707d4824399b
Fix ASAN issue: heap-use-after-free

- The callback for sound play could be called after handle is freed.
- This patch allocates structures for the parameter of callback.
  It will not be freed if the callback is not called when handle is destroyed
  and prevents the heap-use-after-free issue as a result.

[Version] 0.10.285
[Issue Type] ASAN issue

Change-Id: Ie15ed724b47d9f4615d4a476420e02fbd203fb27
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/include/mm_camcorder_internal.h
src/include/mm_camcorder_util.h
src/mm_camcorder_internal.c
src/mm_camcorder_sound.c
src/mm_camcorder_util.c