forked from pool/openssl
94fbf434c7
- 0005-libssl-Hide-library-private-symbols.patch Update to hide more symbols that are not part of the public API - openssl-gcc-attributes.patch BUF_memdup also needs attribute alloc_size as it returns memory of size of the second parameter. - openssl-ocloexec.patch Update, accept() also needs O_CLOEXEC. - 0009-Fix-double-frees.patch, 0017-Double-free-in-i2o_ECPublicKey.patch fix various double frees (from upstream) - 012-Fix-eckey_priv_encode.patch eckey_priv_encode should return an error inmediately on failure of i2d_ECPrivateKey (from upstream) - 0001-Axe-builtin-printf-implementation-use-glibc-instead.patch From libressl, modified to work on linux systems that do not have funopen() but fopencookie() instead. Once upon a time, OS didn't have snprintf, which caused openssl to bundle a *printf implementation. We know better nowadays, the glibc implementation has buffer overflow checking, has sane failure modes deal properly with threads, signals..etc.. - build with -fno-common as well. (forwarded request 232752 from elvigia) OBS-URL: https://build.opensuse.org/request/show/232889 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openssl?expand=0&rev=116
46 lines
2.1 KiB
Diff
46 lines
2.1 KiB
Diff
--- openssl-1.0.1g.orig/crypto/cryptlib.h
|
|
+++ openssl-1.0.1g/crypto/cryptlib.h
|
|
@@ -100,7 +100,7 @@ extern "C" {
|
|
|
|
void OPENSSL_cpuid_setup(void);
|
|
extern unsigned int OPENSSL_ia32cap_P[];
|
|
-void OPENSSL_showfatal(const char *fmta,...);
|
|
+void OPENSSL_showfatal(const char *fmta,...) __attribute__ ((format (printf, 1, 2)));
|
|
void *OPENSSL_stderr(void);
|
|
extern int OPENSSL_NONPIC_relocated;
|
|
|
|
--- openssl-1.0.1g.orig/crypto/crypto.h
|
|
+++ openssl-1.0.1g/crypto/crypto.h
|
|
@@ -487,15 +487,15 @@ void CRYPTO_get_mem_debug_functions(void
|
|
void (**so)(long),
|
|
long (**go)(void));
|
|
|
|
-void *CRYPTO_malloc_locked(int num, const char *file, int line);
|
|
+void *CRYPTO_malloc_locked(int num, const char *file, int line) __attribute__((alloc_size(1)));
|
|
void CRYPTO_free_locked(void *ptr);
|
|
-void *CRYPTO_malloc(int num, const char *file, int line);
|
|
+void *CRYPTO_malloc(int num, const char *file, int line) __attribute__((alloc_size(1)));
|
|
char *CRYPTO_strdup(const char *str, const char *file, int line);
|
|
void CRYPTO_free(void *ptr);
|
|
-void *CRYPTO_realloc(void *addr,int num, const char *file, int line);
|
|
+void *CRYPTO_realloc(void *addr,int num, const char *file, int line) __attribute__((alloc_size(2)));
|
|
void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file,
|
|
- int line);
|
|
-void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
|
|
+ int line) __attribute__((alloc_size(3)));
|
|
+void *CRYPTO_remalloc(void *addr,int num, const char *file, int line) __attribute__((alloc_size(2)));
|
|
|
|
void OPENSSL_cleanse(void *ptr, size_t len);
|
|
|
|
--- openssl-1.0.1g.orig/crypto/buffer/buffer.h
|
|
+++ openssl-1.0.1g/crypto/buffer/buffer.h
|
|
@@ -87,7 +87,7 @@ int BUF_MEM_grow(BUF_MEM *str, size_t le
|
|
int BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
|
|
char * BUF_strdup(const char *str);
|
|
char * BUF_strndup(const char *str, size_t siz);
|
|
-void * BUF_memdup(const void *data, size_t siz);
|
|
+void * BUF_memdup(const void *data, size_t siz) __attribute__((alloc_size(2)));
|
|
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
|
|
|
|
/* safe string functions */
|