Skip to content

Conversation

@t3ls
Copy link

@t3ls t3ls commented Feb 4, 2021

"Unable to convert expiration date/time from bytes" was raised when parse some specific iso9660 images, eg:

https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/xenial/ubuntu-16.04.7-server-amd64.iso

@deitch
Copy link
Collaborator

deitch commented Feb 4, 2021

Would you please update the description as to why this is necessary? When does the slice given by nullBytes (16 of 48 followed by 0) not match appropriately?

Copy link
Collaborator

@deitch deitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the comment in the PR, please:

  • create a single var of alternate nullBytes and compare it, rather than building each time, something like: nullBytesAlt := bytes.Repeat([]byte{0}, len(nullBytes)) and then use that in the bytes.Compare
  • describe in a comment right above that when it is necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants