[libbluray-devel] HDMV instruction trace: Fixed printing null pointer.

hpi1 git at videolan.org
Sun May 26 12:21:14 CEST 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri May 24 15:31:16 2013 +0300| [d51e44882a3cb9cbbbf164ac29643cf1d0d0242b] | committer: hpi1

HDMV instruction trace: Fixed printing null pointer.

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

 src/libbluray/hdmv/mobj_print.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/hdmv/mobj_print.c b/src/libbluray/hdmv/mobj_print.c
index 3b9a706..27f04e0 100644
--- a/src/libbluray/hdmv/mobj_print.c
+++ b/src/libbluray/hdmv/mobj_print.c
@@ -214,9 +214,9 @@ static int _sprint_operands(char *buf, MOBJ_CMD *cmd)
         buf += sprintf(buf, "       \t      ");
     }
 
-    if (psr1 >= 0)
+    if (psr1 >= 0 && psr1 < 128 && psr_info[psr1])
         buf += sprintf(buf, " %s", psr_info[psr1]);
-    if (psr2 >= 0 && psr2 != psr1)
+    if (psr2 >= 0 && psr2 < 128 && psr2 != psr1 && psr_info[psr2])
         buf += sprintf(buf, " %s", psr_info[psr2]);
 
     return buf - start;



More information about the libbluray-devel mailing list