[libdvdcss-devel] css: Fix typo in memcpy() size calculation

M. Levinson git at videolan.org
Tue Nov 11 14:03:42 CET 2014


libdvdcss | branch: master | M. Levinson <mlevins at users.sourceforge.net> | Mon Nov 10 18:03:47 2014 -0500| [29c1c8f7db12f8a4c753a692d7eb38432757474b] | committer: Diego Biurrun

css: Fix typo in memcpy() size calculation

The sizeof argument is an array, not a pointer, dereferencing it is wrong.

Signed-off-by: Diego Biurrun <diego at biurrun.de>

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=29c1c8f7db12f8a4c753a692d7eb38432757474b
---

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

diff --git a/src/css.c b/src/css.c
index f986424..c6cd481 100644
--- a/src/css.c
+++ b/src/css.c
@@ -205,7 +205,7 @@ int dvdcss_title ( dvdcss_t dvdcss, int i_block )
          && p_title->i_startlb == i_block )
     {
         /* We've already cracked this key, nothing to do */
-        memcpy( dvdcss->css.p_title_key, p_title->p_key, sizeof(*p_title->p_key) );
+        memcpy( dvdcss->css.p_title_key, p_title->p_key, sizeof(p_title->p_key) );
         return 0;
     }
 



More information about the libdvdcss-devel mailing list