diff options
author | Richard Levitte <levitte@openssl.org> | 2003-12-11 18:01:03 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2003-12-11 18:01:03 +0000 |
commit | a2b0de98af8ca4de5fd27484f4925cdc351a9020 (patch) | |
tree | a360d71c67af1c1a5c5645c20cf6880e0d66a081 /crypto/bio/b_print.c | |
parent | 4775944f8138a52660f4511fcd5e75b0dbd0a409 (diff) | |
download | openssl-new-a2b0de98af8ca4de5fd27484f4925cdc351a9020.tar.gz |
To figure out if we're going outside the buffer, use the size of the buffer,
not the size of the integer used to index in said buffer.
PR: 794
Notified by: Rhett Garber <rhett_garber@hp.com>
Diffstat (limited to 'crypto/bio/b_print.c')
-rw-r--r-- | crypto/bio/b_print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index de74ec6df9..960a049bca 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -652,8 +652,8 @@ fmtfp( (caps ? "0123456789ABCDEF" : "0123456789abcdef")[intpart % 10]; intpart = (intpart / 10); - } while (intpart && (iplace < (int)sizeof(iplace))); - if (iplace == sizeof iplace) + } while (intpart && (iplace < (int)sizeof(iconvert))); + if (iplace == sizeof iconvert) iplace--; iconvert[iplace] = 0; @@ -664,7 +664,7 @@ fmtfp( : "0123456789abcdef")[fracpart % 10]; fracpart = (fracpart / 10); } while (fplace < max); - if (fplace == sizeof fplace) + if (fplace == sizeof fconvert) fplace--; fconvert[fplace] = 0; |