Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SegmentationUpid.ASCIIValue() has issue in v1.4.3 #35

Closed
veloandy opened this issue Aug 10, 2023 · 1 comment · Fixed by #36
Closed

SegmentationUpid.ASCIIValue() has issue in v1.4.3 #35

veloandy opened this issue Aug 10, 2023 · 1 comment · Fixed by #36

Comments

@veloandy
Copy link

The ASCIIValue() method in release scte35-go v1.4.3 panics with

panic: runtime error: index out of range [0] with length 0

from scte35-go@v1.4.3/pkg/scte35/segmentation_upid.go:176

This worked without issue in version 1.4.2.

This is a quick program to reproduce:

package main

import (
	"fmt"

	"github.com/Comcast/scte35-go/pkg/scte35"
)

func main() {
	upid := scte35.SegmentationUPID{
		Type:  0x09,
		Value: "SIGNAL:z1sFOMjCnV4AAAAAAAABAQ==",
	}
	fmt.Printf("%+v\n", upid)
	fmt.Printf("%+v\n", upid.ASCIIValue()) // <- panics with index out of range in scte35.go v1.4.3. Was OK in v1.4.2.
}
@blahspam blahspam linked a pull request Aug 11, 2023 that will close this issue
@blahspam
Copy link
Collaborator

Thanks @veloandy. Fixed in v1.4.4.

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 a pull request may close this issue.

2 participants