mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Coverity fixes
Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
This commit is contained in:
committed by
David Schleef
parent
c2593cc1bd
commit
6c8d740c1a
@@ -259,7 +259,7 @@ void FLAC__MD5Final(FLAC__byte digest[16], FLAC__MD5Context *ctx)
|
||||
|
||||
byteSwap(ctx->buf, 4);
|
||||
memcpy(digest, ctx->buf, 16);
|
||||
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
|
||||
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
|
||||
if(0 != ctx->internal_buf) {
|
||||
free(ctx->internal_buf);
|
||||
ctx->internal_buf = 0;
|
||||
@@ -408,7 +408,8 @@ FLAC__bool FLAC__MD5Accumulate(FLAC__MD5Context *ctx, const FLAC__int32 * const
|
||||
if(0 == (ctx->internal_buf = (FLAC__byte*)safe_malloc_(bytes_needed)))
|
||||
return false;
|
||||
}
|
||||
ctx->internal_buf = tmp;
|
||||
else
|
||||
ctx->internal_buf = tmp;
|
||||
ctx->capacity = bytes_needed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user