diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-08-22 12:54:21 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-08-22 12:54:21 +0000 |
commit | 469938cb4012472d3d99ed7ead258aef3a5bc029 (patch) | |
tree | 429467bb525a63d80e4a16efc419f57fee82a58b /crypto/asn1/a_strex.c | |
parent | eaa28181898b8ca0b54552a3290789bb17444c8a (diff) | |
download | openssl-469938cb4012472d3d99ed7ead258aef3a5bc029.tar.gz |
Fixes to d2i_ASN1_OBJECT, ASN1_INTEGER_to_BN and a_strex.c
Diffstat (limited to 'crypto/asn1/a_strex.c')
-rw-r--r-- | crypto/asn1/a_strex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c index f94ae2751b..02fe2bad1c 100644 --- a/crypto/asn1/a_strex.c +++ b/crypto/asn1/a_strex.c @@ -96,7 +96,7 @@ int send_bio_chars(void *arg, const void *buf, int len) int send_fp_chars(void *arg, const void *buf, int len) { if(!arg) return 1; - if(fwrite(buf, 1, len, arg) != len) return 0; + if(fwrite(buf, 1, len, arg) != (unsigned int)len) return 0; return 1; } @@ -123,7 +123,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch if(!io_ch(arg, tmphex, 6)) return -1; return 6; } - chtmp = c; + chtmp = (unsigned char)c; if(chtmp > 0x7f) chflgs = flags & ASN1_STRFLGS_ESC_MSB; else chflgs = char_type[chtmp] & flags; if(chflgs & CHARTYPE_BS_ESC) { @@ -200,12 +200,12 @@ static int do_buf(unsigned char *buf, int buflen, * otherwise each character will be > 0x7f and so the * character will never be escaped on first and last. */ - len = do_esc_char(utfbuf[i], flags | orflags, quotes, io_ch, arg); + len = do_esc_char(utfbuf[i], (unsigned char)(flags | orflags), quotes, io_ch, arg); if(len < 0) return -1; outlen += len; } } else { - len = do_esc_char(c, flags | orflags, quotes, io_ch, arg); + len = do_esc_char(c, (unsigned char)(flags | orflags), quotes, io_ch, arg); if(len < 0) return -1; outlen += len; } @@ -304,7 +304,7 @@ static int do_print_ex(char_io *io_ch, void *arg, unsigned long lflags, ASN1_STR unsigned char flags; quotes = 0; /* Keep a copy of escape flags */ - flags = lflags & ESC_FLAGS; + flags = (unsigned char)(lflags & ESC_FLAGS); type = str->type; |