You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/10/31 10:28:05 UTC

[GitHub] [mynewt-artifact] utzig commented on a change in pull request #13: Parse protected TLVs when parsing an image

utzig commented on a change in pull request #13: Parse protected TLVs when parsing an image
URL: https://github.com/apache/mynewt-artifact/pull/13#discussion_r341058971
 
 

 ##########
 File path: image/parse.go
 ##########
 @@ -161,13 +182,36 @@ func ParseImage(imgData []byte) (Image, error) {
 	}
 	offset += size
 
+	var protTrailer *ImageTrailer
+	var protTlvs []ImageTlv
+	if hdr.ProtSz > 0 {
+		pt, size, err := parseRawTrailer(imgData, offset)
+		if err != nil {
 
 Review comment:
   I would suggest extending this to `err != nil && size != hdr.ProtSz`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services