projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add volatile qualifications to two blocks of inline asm to stop GCC from
[oweals/openssl.git]
/
crypto
/
evp
/
encode.c
diff --git
a/crypto/evp/encode.c
b/crypto/evp/encode.c
index 32744ca686e1905382100b20869c06cc456201c7..69f7ccad69a697956e5238f84e05fea8cee2206b 100644
(file)
--- a/
crypto/evp/encode.c
+++ b/
crypto/evp/encode.c
@@
-129,7
+129,7
@@
void EVP_EncodeInit(EVP_ENCODE_CTX *ctx)
}
void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
}
void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
- unsigned char *in, int inl)
+
const
unsigned char *in, int inl)
{
int i,j;
unsigned int total=0;
{
int i,j;
unsigned int total=0;
@@
-233,9
+233,9
@@
void EVP_DecodeInit(EVP_ENCODE_CTX *ctx)
* 1 for full line
*/
int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
* 1 for full line
*/
int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
- unsigned char *in, int inl)
+
const
unsigned char *in, int inl)
{
{
- int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,
tmp2,
exp_nl;
+ int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,exp_nl;
unsigned char *d;
n=ctx->num;
unsigned char *d;
n=ctx->num;
@@
-313,18
+313,18
@@
int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
/* There will never be more than two '=' */
}
/* There will never be more than two '=' */
}
- if ((v == B64_EOF) || (n >= 64))
+ if ((v == B64_EOF
&& (n&3) == 0
) || (n >= 64))
{
/* This is needed to work correctly on 64 byte input
* lines. We process the line and then need to
* accept the '\n' */
if ((v != B64_EOF) && (n >= 64)) exp_nl=1;
{
/* This is needed to work correctly on 64 byte input
* lines. We process the line and then need to
* accept the '\n' */
if ((v != B64_EOF) && (n >= 64)) exp_nl=1;
- tmp2=v;
if (n > 0)
{
v=EVP_DecodeBlock(out,d,n);
if (n > 0)
{
v=EVP_DecodeBlock(out,d,n);
- if (v < 0) { rv=0; goto end; }
n=0;
n=0;
+ if (v < 0) { rv=0; goto end; }
+ if (eof > v) { rv=-1; goto end; }
ret+=(v-eof);
}
else
ret+=(v-eof);
}
else