diff options
| author | miod <> | 2014-05-18 19:30:36 +0000 |
|---|---|---|
| committer | miod <> | 2014-05-18 19:30:36 +0000 |
| commit | 22a6d08ee6c69b4a77350b5ac129544665b576ec (patch) | |
| tree | a9b8f85766f98b5f0847c8ac9dc7737604ab25a0 /src/lib/libssl/src | |
| parent | b274e53c54eb4a5bfe7289c4926b37ede04932ab (diff) | |
| download | openbsd-22a6d08ee6c69b4a77350b5ac129544665b576ec.tar.gz openbsd-22a6d08ee6c69b4a77350b5ac129544665b576ec.tar.bz2 openbsd-22a6d08ee6c69b4a77350b5ac129544665b576ec.zip | |
Make sure UTF8_getc() is invoked with the proper buffer size.
ok beck@ guenther@
Diffstat (limited to 'src/lib/libssl/src')
| -rw-r--r-- | src/lib/libssl/src/crypto/asn1/a_strex.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/src/crypto/asn1/a_strex.c b/src/lib/libssl/src/crypto/asn1/a_strex.c index 248eac28f6..462a4059be 100644 --- a/src/lib/libssl/src/crypto/asn1/a_strex.c +++ b/src/lib/libssl/src/crypto/asn1/a_strex.c | |||
| @@ -111,7 +111,7 @@ send_fp_chars(void *arg, const void *buf, int len) | |||
| 111 | { | 111 | { |
| 112 | if (!arg) | 112 | if (!arg) |
| 113 | return 1; | 113 | return 1; |
| 114 | if (fwrite(buf, 1, len, arg) != (unsigned int)len) | 114 | if (fwrite(buf, 1, (size_t)len, arg) != (size_t)len) |
| 115 | return 0; | 115 | return 0; |
| 116 | return 1; | 116 | return 1; |
| 117 | } | 117 | } |
| @@ -227,7 +227,7 @@ do_buf(unsigned char *buf, int buflen, int type, unsigned char flags, | |||
| 227 | break; | 227 | break; |
| 228 | 228 | ||
| 229 | case 0: | 229 | case 0: |
| 230 | i = UTF8_getc(p, buflen, &c); | 230 | i = UTF8_getc(p, q - p, &c); |
| 231 | if (i < 0) | 231 | if (i < 0) |
| 232 | return -1; /* Invalid UTF8String */ | 232 | return -1; /* Invalid UTF8String */ |
| 233 | p += i; | 233 | p += i; |
