[vlc-devel] commit: Fix dangling pointer use when shrinking a non-standard block ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Oct 5 15:43:43 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Oct  5 16:42:01 2008 +0300| [2c3d9f177115dbbf0af0cdb0fe76ec09e603c0c6] | committer: Rémi Denis-Courmont 

Fix dangling pointer use when shrinking a non-standard block

I believe this path cannot be triggered at the moment however, as
there quite few block_Realloc users. Fixes CID#197.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c3d9f177115dbbf0af0cdb0fe76ec09e603c0c6
---

 src/misc/block.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/misc/block.c b/src/misc/block.c
index 7677d77..380e822 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -124,6 +124,7 @@ block_t *block_Realloc( block_t *p_block, ssize_t i_prebody, size_t i_body )
             return NULL;
 
         p_block = p_dup;
+        p_sys = (block_sys_t *)p_block;
     }
 
     /* Adjust reserved header if there is enough room */




More information about the vlc-devel mailing list