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

git version control git at videolan.org
Mon Oct 6 15:46:45 CEST 2008


vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Oct  5 16:42:01 2008 +0300| [d65db8e6670425dd1efea7ab508add810e643625] | committer: Derk-Jan Hartman 

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.
(cherry picked from commit 2c3d9f177115dbbf0af0cdb0fe76ec09e603c0c6)

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

 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 80832f5..f666de0 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