mirror of https://github.com/dsoprea/go-exif.git
undefined/exif_9286_user_comment.go: Validate for minimum user-notes size
parent
45986dbda3
commit
80e3b12b98
|
@ -105,6 +105,10 @@ func (Codec9286UserComment) Decode(valueContext *exifcommon.ValueContext) (value
|
|||
valueBytes, err := valueContext.ReadBytes()
|
||||
log.PanicIf(err)
|
||||
|
||||
if len(valueBytes) < 8 {
|
||||
return nil, ErrUnparseableValue
|
||||
}
|
||||
|
||||
unknownUc := Tag9286UserComment{
|
||||
EncodingType: TagUndefinedType_9286_UserComment_Encoding_UNDEFINED,
|
||||
EncodingBytes: []byte{},
|
||||
|
|
Loading…
Reference in New Issue