Description: Fix TestsGoFuzzCrashers
 Limit readLongstr to max(uint32) because slices on 386 can be at most of max(uint32) size
Author: Philipp Hug <hug@debian.org>
Origin: upstream
Bug: https://github.com/streadway/amqp/issues/261
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860684
Forwarded: https://github.com/streadway/amqp/pull/265
Last-Update: 2017-05-06

---

--- golang-github-streadway-amqp-0.0~git20150820.0.f4879ba.orig/read.go
+++ golang-github-streadway-amqp-0.0~git20150820.0.f4879ba/read.go
@@ -109,6 +109,11 @@ func readLongstr(r io.Reader) (v string,
 		return
 	}
 
+	// slices can't be longer than max int32 value
+	if (length > (^uint32(0) >> 1)) {
+		return
+	}
+
 	bytes := make([]byte, length)
 	if _, err = io.ReadFull(r, bytes); err != nil {
 		return
