unit tests

Signed-off-by: Casey Lee <[email protected]>
This commit is contained in:
Casey Lee committed 2020-02-20 21:05:31 -05:00
1 parent be75ee20b1
commit 0582306861
466 files changed
+94682 -62525

No files matched your search

+3
View File
@@ -541,6 +541,9 @@ func ServeAgent(agent Agent, c io.ReadWriter) error {
return err
}
l := binary.BigEndian.Uint32(length[:])
if l == 0 {
return fmt.Errorf("agent: request size is 0")
}
if l > maxAgentResponseBytes {
// We also cap requests.
return fmt.Errorf("agent: request too large: %d", l)