[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flac-dev
Subject:    [flac-dev] Bug in FLAC__MD5Final?
From:       Ben Allison <benski () winamp ! com>
Date:       2012-01-12 17:00:04
Message-ID: 9B80CD80-DCBE-4084-A460-669048932229 () winamp ! com
[Download RAW message or body]

in FLAC__MD5Final, I see the following line of code

memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */

ctx is a pointer, so sizeof(ctx) will be 4 or 8.  I believe the intent is for the \
line to be

memset(ctx, 0, sizeof(*ctx));

Am I correct?  This is a non-critical issue, I think.  I'm not even sure the purpose \
of this.  It appears to be for zeroing out the passed in data structure, but it's \
only zeroing out the first 4 bytes (or 8 on 64bit platforms)

-Ben Allison
Nullsoft, Inc.
_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic