Fix read DNS message

This commit is contained in:
世界 committed 2022-08-26 13:35:27 +08:00
1 parent 9ac31d0233
commit c5e38203eb
2 files changed
+53 -46

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ func StreamDomainNameQuery(readCtx context.Context, reader io.Reader) (*adapter.
if err != nil {
return nil, err
}
if length > 512 {
if length == 0 {
return nil, os.ErrInvalid
}
_buffer := buf.StackNewSize(int(length))