title: Go: bytes.Repeat check for overflow
body: <p>In Go's bytes package line 412 of bytes.go, there is a condition that goes as follows: (<a href="https://golang.org/src/bytes/bytes.go?s=10462:10501#L412" rel="nofollow noreferrer">https://golang.org/src/bytes/bytes.go?s=10462:10501#L412</a>)</p>
  
  <pre><code>len(b)*count/count != len(b)
  </code></pre>
  
  <p>This should apparently check for overflow but I don't understand how. Is this checking for some overflow of the underlying data type for integer? Or is this an error in implementation? <code>len(b)*count/count</code> should always be <code>len(b)</code>...no?</p>