Discussion:
[libdvdcss-devel] css: Fix typo in memcpy() size calculation
M. Levinson
2014-11-11 13:03:42 UTC
Permalink
libdvdcss | branch: master | M. Levinson <***@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.
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;
}

Loading...