diff options
| author | Gary Ching-Pang Lin <glin@suse.com> | 2014-08-19 12:15:00 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2014-08-19 14:20:23 -0400 |
| commit | 21f96e586351fc8b535353f2dea7c784e931d14a (patch) | |
| tree | c7028a2687dcc1ce83f2b3bfdf25d0a3f9af7aa1 /Cryptlib/OpenSSL/crypto/objects/obj_dat.c | |
| parent | fa525bc4632e04346fae82a98ce23b31c6cfc86d (diff) | |
| download | efi-boot-shim-21f96e586351fc8b535353f2dea7c784e931d14a.tar.gz efi-boot-shim-21f96e586351fc8b535353f2dea7c784e931d14a.zip | |
Update openssl to 0.9.8zb
Also update to Tiano Cryptlib r15802 and remove the execute mode
bits from the C and header files of openssl
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/objects/obj_dat.c')
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/objects/obj_dat.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Cryptlib/OpenSSL/crypto/objects/obj_dat.c b/Cryptlib/OpenSSL/crypto/objects/obj_dat.c index 760af16d..cf5ba2a1 100755..100644 --- a/Cryptlib/OpenSSL/crypto/objects/obj_dat.c +++ b/Cryptlib/OpenSSL/crypto/objects/obj_dat.c @@ -444,11 +444,12 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) unsigned char *p; char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; - if ((a == NULL) || (a->data == NULL)) { - buf[0]='\0'; - return(0); - } + /* Ensure that, at every state, |buf| is NUL-terminated. */ + if (buf && buf_len > 0) + buf[0] = '\0'; + if ((a == NULL) || (a->data == NULL)) + return(0); if (!no_name && (nid=OBJ_obj2nid(a)) != NID_undef) { @@ -527,9 +528,10 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) i=(int)(l/40); l-=(long)(i*40); } - if (buf && (buf_len > 0)) + if (buf && (buf_len > 1)) { *buf++ = i + '0'; + *buf = '\0'; buf_len--; } n++; @@ -544,9 +546,10 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) i = strlen(bndec); if (buf) { - if (buf_len > 0) + if (buf_len > 1) { *buf++ = '.'; + *buf = '\0'; buf_len--; } BUF_strlcpy(buf,bndec,buf_len); @@ -786,4 +789,3 @@ err: OPENSSL_free(buf); return(ok); } - |
