Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
ez-ipupdate
ez-ipupdate-type-punning.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ez-ipupdate-type-punning.patch of Package ez-ipupdate
From: Philipp Thomas <pth@suse.de> Date: 2013-04-11 11:24:54+02:00 Subject: Use memcpy for type-punning --- md5.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) signed-off-by: pth@suse.de Index: md5.c =================================================================== --- md5.c.orig 2013-04-11 10:50:22.160673361 +0200 +++ md5.c 2013-04-11 11:18:46.118299579 +0200 @@ -92,6 +92,7 @@ md5_finish_ctx (struct md5_ctx *ctx, voi { /* Take yet unprocessed bytes into account. */ md5_uint32 bytes = ctx->buflen; + md5_uint32 tmp; size_t pad; /* Now count remaining bytes. */ @@ -103,9 +104,10 @@ md5_finish_ctx (struct md5_ctx *ctx, voi memcpy (&ctx->buffer[bytes], fillbuf, pad); /* Put the 64-bit file length in *bits* at the end of the buffer. */ - *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); - *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | - (ctx->total[0] >> 29)); + tmp = SWAP (ctx->total[0] << 3); + memcpy(&ctx->buffer[bytes + pad], &tmp, sizeof(md5_uint32)); + tmp = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); + memcpy(&ctx->buffer[bytes + pad + 4], &tmp, sizeof(md5_uint32)); /* Process last bytes. */ md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor