Skip to content

Commit

Permalink
Fix panic when using QUICRandomFrames
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyech committed Jan 18, 2025
1 parent a741f02 commit c1b5949
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion u_packet_packer.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (p *uPacketPacker) MarshalInitialPacketPayload(pl payload, v protocol.Versi
return nil, err
}

if p.uSpec.InitialPacketSpec.FrameBuilder == nil || len(p.uSpec.InitialPacketSpec.FrameBuilder.(QUICFrames)) == 0 {
if qf, ok := p.uSpec.InitialPacketSpec.FrameBuilder.(QUICFrames); p.uSpec.InitialPacketSpec.FrameBuilder == nil || ok && len(qf) == 0 {
qfs := QUICFrames{}
for _, frame := range qchframes {
if cryptoFrame, ok := frame.(*clienthellod.CRYPTO); ok {
Expand Down

0 comments on commit c1b5949

Please sign in to comment.