You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2019/06/20 17:42:17 UTC

[mynewt-artifact] 05/12: Fix int overflow on 32-bit platforms.

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-artifact.git

commit 353f34383c32b3c935cbe9c3e410527c4c26a184
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Jan 2 13:15:38 2019 -0800

    Fix int overflow on 32-bit platforms.
---
 image/image.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/image/image.go b/image/image.go
index 705abe6..6bd0050 100644
--- a/image/image.go
+++ b/image/image.go
@@ -440,7 +440,7 @@ func parseRawHeader(imgData []byte, offset int) (ImageHdr, int, error) {
 	if hdr.Magic != IMAGE_MAGIC {
 		return hdr, 0, util.FmtNewtError(
 			"Image magic incorrect; expected 0x%08x, got 0x%08x",
-			IMAGE_MAGIC, hdr.Magic)
+			uint32(IMAGE_MAGIC), hdr.Magic)
 	}
 
 	remLen := len(imgData) - offset