[libdvdcss-devel] [PATCH] fix sprintf format strings

Sam Hocevar sam at zoy.org
Fri Aug 29 21:42:24 CEST 2008


On Thu, Aug 21, 2008, Diego Biurrun wrote:
> Here is a patch that we have been using in MPlayer for a while.  Some
> sprintf calls in libdvdcss.c are not using the correct format string for
> the uint8_t type.  The Subversion log message is
> 
> Log:
> Fix CSS format strings, they could print more than two digits for
> "negative" numbers.

   As discussed on IRC, a fix for this issue was actually already in
trunk. I do not feel the need to switch to PRIx8 conversions because
arguments smaller than int will be promoted with the expected sign
extension anyway (C standard 6.5.2.3p7 for variadic function rules,
6.3.1.1 for integer promotion).

Cheers,
-- 
Sam.


More information about the libdvdcss-devel mailing list