projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typo, add prototype
[oweals/openssl.git]
/
crypto
/
asn1
/
a_object.c
diff --git
a/crypto/asn1/a_object.c
b/crypto/asn1/a_object.c
index 71ce7c3896c397b632cc5725229d4813e0ff6df4..3e6531481b39bbfbd86c4976a632b1b30290b58f 100644
(file)
--- a/
crypto/asn1/a_object.c
+++ b/
crypto/asn1/a_object.c
@@
-183,16
+183,16
@@
int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a)
if ((a == NULL) || (a->data == NULL))
return(BIO_write(bp,"NULL",4));
if ((a == NULL) || (a->data == NULL))
return(BIO_write(bp,"NULL",4));
- i=i2t_ASN1_OBJECT(buf,
80
,a);
- if (i >
80) i=80
;
+ i=i2t_ASN1_OBJECT(buf,
sizeof buf
,a);
+ if (i >
(int)sizeof(buf)) i=sizeof buf
;
BIO_write(bp,buf,i);
return(i);
}
BIO_write(bp,buf,i);
return(i);
}
-ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp,
+ASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a,
const
unsigned char **pp,
long length)
{
long length)
{
- unsigned char *p;
+
const
unsigned char *p;
long len;
int tag,xclass;
int inf,i;
long len;
int tag,xclass;
int inf,i;
@@
-219,11
+219,11
@@
err:
ASN1_OBJECT_free(ret);
return(NULL);
}
ASN1_OBJECT_free(ret);
return(NULL);
}
-ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp,
+ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a,
const
unsigned char **pp,
long len)
{
ASN1_OBJECT *ret=NULL;
long len)
{
ASN1_OBJECT *ret=NULL;
- unsigned char *p;
+
const
unsigned char *p;
int i;
/* only the ASN1_OBJECTs from the 'table' will have values
int i;
/* only the ASN1_OBJECTs from the 'table' will have values
@@
-255,7
+255,7
@@
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, unsigned char **pp,
*pp=p;
return(ret);
err:
*pp=p;
return(ret);
err:
- ASN1err(ASN1_F_
D
2I_ASN1_OBJECT,i);
+ ASN1err(ASN1_F_
C
2I_ASN1_OBJECT,i);
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
ASN1_OBJECT_free(ret);
return(NULL);
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
ASN1_OBJECT_free(ret);
return(NULL);