[libbluray-devel] Fixed using incorrect pointer type. Fixed using uninitialized data after xml parse error.

hpi1 git at videolan.org
Tue Mar 5 10:49:14 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Mar  5 11:48:13 2013 +0200| [73b1dade94460308293156b9ca0b3046869811f1] | committer: hpi1

Fixed using incorrect pointer type. Fixed using uninitialized data after xml parse error.

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

 src/libbluray/bdnav/meta_parse.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdnav/meta_parse.c b/src/libbluray/bdnav/meta_parse.c
index b9ee66c..77e36b0 100644
--- a/src/libbluray/bdnav/meta_parse.c
+++ b/src/libbluray/bdnav/meta_parse.c
@@ -88,7 +88,10 @@ static void _parseManifestNode(xmlNode * a_node, META_DL *disclib)
                     disclib->thumbnails = realloc(disclib->thumbnails, (disclib->thumb_count*sizeof(META_THUMBNAIL)));
                     disclib->thumbnails[i].path = (char *)tmp;
                     if ((tmp = xmlGetProp(cur_node, BAD_CAST_CONST "size"))) {
-                        sscanf((const char*)tmp, "%ix%i", &disclib->thumbnails[i].xres, &disclib->thumbnails[i].yres);
+                        int x = 0, y = 0;
+                        sscanf((const char*)tmp, "%ix%i", &x, &y);
+                        disclib->thumbnails[i].xres = x;
+                        disclib->thumbnails[i].yres = y;
                         X_FREE(tmp);
                     }
                     else {



More information about the libbluray-devel mailing list