[FFmpeg-devel] [PATCH] Fix 64 bit truncation in asfdec.c

Michael Niedermayer michaelni
Thu May 28 17:50:25 CEST 2009


On Thu, May 28, 2009 at 08:24:10AM -0700, David DeHaven wrote:
>
>>> -static int get_value(ByteIOContext *pb, int type){
>>> +static uint64_t get_value(ByteIOContext *pb, int type){
>>
>> why do you change it from signed to unsigned?
>
>
> It's only used to read boolean (where sign doesn't matter since it's one or 
> zero), WORD, DWORD or QWORD which AFAIK are all unsigned values. That, and 
> it's only called once in the file and it's cast to uint64_t.

well INT64_MIN doesnt fit in and your patch adds that

also if some positive value indicates failure that should be documented
because its not common but honestly keeping it signed seems like the easier
way

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090528/f545610f/attachment.pgp>



More information about the ffmpeg-devel mailing list