[libbluray-devel] Replace missed realloc with _safe_realloc.

ace20022 git at videolan.org
Tue May 30 17:35:44 CEST 2017


libudfread | branch: master | ace20022 <ace20022 at ymail.com> | Tue May 30 14:00:26 2017 +0200| [4cbdf4412bc4a781ef2cce04e1a7f93286753a23] | committer: Petri Hintukainen

Replace missed realloc with _safe_realloc.

> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=4cbdf4412bc4a781ef2cce04e1a7f93286753a23
---

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

diff --git a/src/ecma167.c b/src/ecma167.c
index 814e7af..2a3f60e 100644
--- a/src/ecma167.c
+++ b/src/ecma167.c
@@ -341,7 +341,7 @@ int decode_allocation_extent(struct file_entry **p_fe, const uint8_t *p, size_t
         return 0;
     }
 
-    fe = (struct file_entry *)realloc(fe, sizeof(struct file_entry) + sizeof(struct long_ad) * (fe->num_ad + num_ad - 1));
+    fe = (struct file_entry *)_safe_realloc(fe, sizeof(struct file_entry) + sizeof(struct long_ad) * (fe->num_ad + num_ad - 1));
     if (!fe) {
         return -1;
     }



More information about the libbluray-devel mailing list