[libbluray-devel] Fix allocated size

hpi1 git at videolan.org
Wed May 13 13:01:20 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed May 13 13:34:00 2015 +0300| [dd11959f2f1f2c8361a701ac717f0aa9a9396e9b] | committer: hpi1

Fix allocated size

Too much memory was allocated.

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

 src/libbluray/bdj/bdjo_parse.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/bdjo_parse.c b/src/libbluray/bdj/bdjo_parse.c
index 6f838ec..254b1e1 100644
--- a/src/libbluray/bdj/bdjo_parse.c
+++ b/src/libbluray/bdj/bdjo_parse.c
@@ -291,7 +291,7 @@ static int _parse_app_params(BITSTREAM *bs, BDJO_APP *p)
     p->num_param = _count_app_strings(bs, data_length, 0, "params");
 
     if (p->num_param) {
-        p->param = calloc(p->num_param, sizeof(BDJO_APP_NAME));
+        p->param = calloc(p->num_param, sizeof(BDJO_APP_PARAM));
         if (!p->param) {
             BD_DEBUG(DBG_BDJ | DBG_CRIT, "Out of memory\n");
             return -1;



More information about the libbluray-devel mailing list