Step 2 of the PKCS #1 v1.5 signature verification operation as described in RFC 8017 section 8.2.2 reads:
2. RSA verification:
a. Convert the signature S to an integer signature
representative s (see Section 4.2):
s = OS2IP (S).
b. Apply the RSAVP1 verification primitive (Section 5.2.2) to
the RSA public key (n, e) and the signature representative
s to produce an integer message representative m:
m = RSAVP1 ((n, e), s).
If RSAVP1 outputs "signature representative out of range",
output "invalid signature" and stop.
c. Convert the message representative m to an encoded message
EM of length k octets (see Section 4.1):
EM = I2OSP (m, k).
If I2OSP outputs "integer too large", output "invalid
signature" and stop.
The "integer too large" error mentioned in step 2c occurs if and only if $m \geq 256^k$ (see section 4.1), where $k$ is the octet length of the RSA modulus $n$.
But, by construction of the RSAVP1
primitive (see section 5.2.2), $0 \leq m \leq n - 1$, or, equivalently, $0 \leq m < n$.
Because $n < 256^k$, we therefore have $m < 256^k$.
It seems to me that I2OSP
could not possibly output "integer too large". But why was this condition included in the specification, if so?