[libbluray-devel] bd_info: fixed alloc size

npzacs git at videolan.org
Mon May 7 13:45:31 CEST 2012


libbluray | branch: master | npzacs <npzacs at gmail.com> | Mon May  7 14:45:13 2012 +0300| [89e68a40ddc4a11d4538da2281ef1ac4260a8d6b] | committer: npzacs

bd_info: fixed alloc size

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=89e68a40ddc4a11d4538da2281ef1ac4260a8d6b
---

 src/examples/bd_info.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/examples/bd_info.c b/src/examples/bd_info.c
index 069e1b0..e5d4bd2 100644
--- a/src/examples/bd_info.c
+++ b/src/examples/bd_info.c
@@ -55,7 +55,7 @@ static const char *_hex2str(const uint8_t *data, size_t len)
     static char *str = NULL;
     size_t i;
 
-    str = realloc(str, len + 1);
+    str = realloc(str, 2*len + 1);
     *str = 0;
 
     for (i = 0; i < len; i++) {



More information about the libbluray-devel mailing list