diff options
| author | deraadt <> | 2014-05-30 20:10:00 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-05-30 20:10:00 +0000 |
| commit | 92b10f0a59ac195262d51f034f7950fe8c367df7 (patch) | |
| tree | 1e32da9969bf32929d48fbb68dd26078ad5a8e00 | |
| parent | 8411d8ba18d480b4236de154dab969bcc3bf73a9 (diff) | |
| download | openbsd-92b10f0a59ac195262d51f034f7950fe8c367df7.tar.gz openbsd-92b10f0a59ac195262d51f034f7950fe8c367df7.tar.bz2 openbsd-92b10f0a59ac195262d51f034f7950fe8c367df7.zip | |
Don't add potentially nasty stderr uses to dead CRYPTO_dbg_mem functions.
But do use the abort(), which we are hoping all future vendors will move
towards the more modern "do not flush streams"; hint hint, if you didn't
do that already, there are grave risks because much software brings risk
without that behaviour. We didn't cause the change.. POSIX did...
ok beck
| -rw-r--r-- | src/lib/libcrypto/mem_dbg.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/mem_dbg.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/mem_dbg.c b/src/lib/libcrypto/mem_dbg.c index 288ee907c3..3e56c79a25 100644 --- a/src/lib/libcrypto/mem_dbg.c +++ b/src/lib/libcrypto/mem_dbg.c | |||
| @@ -162,14 +162,14 @@ void | |||
| 162 | CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, | 162 | CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, |
| 163 | int before_p) | 163 | int before_p) |
| 164 | { | 164 | { |
| 165 | fprintf(stderr, "this is a bad idea"); | 165 | /* CRYPTO_dbg_malloc is no longer permitted */ |
| 166 | abort(); | 166 | abort(); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | void | 169 | void |
| 170 | CRYPTO_dbg_free(void *addr, int before_p) | 170 | CRYPTO_dbg_free(void *addr, int before_p) |
| 171 | { | 171 | { |
| 172 | fprintf(stderr, "this is a bad idea"); | 172 | /* CRYPTO_dbg_free is no longer permitted */ |
| 173 | abort(); | 173 | abort(); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| @@ -177,7 +177,7 @@ void | |||
| 177 | CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, | 177 | CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, |
| 178 | const char *file, int line, int before_p) | 178 | const char *file, int line, int before_p) |
| 179 | { | 179 | { |
| 180 | fprintf(stderr, "this is a bad idea"); | 180 | /* CRYPTO_dbg_realloc is no longer permitted */ |
| 181 | abort(); | 181 | abort(); |
| 182 | } | 182 | } |
| 183 | 183 | ||
diff --git a/src/lib/libssl/src/crypto/mem_dbg.c b/src/lib/libssl/src/crypto/mem_dbg.c index 288ee907c3..3e56c79a25 100644 --- a/src/lib/libssl/src/crypto/mem_dbg.c +++ b/src/lib/libssl/src/crypto/mem_dbg.c | |||
| @@ -162,14 +162,14 @@ void | |||
| 162 | CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, | 162 | CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line, |
| 163 | int before_p) | 163 | int before_p) |
| 164 | { | 164 | { |
| 165 | fprintf(stderr, "this is a bad idea"); | 165 | /* CRYPTO_dbg_malloc is no longer permitted */ |
| 166 | abort(); | 166 | abort(); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | void | 169 | void |
| 170 | CRYPTO_dbg_free(void *addr, int before_p) | 170 | CRYPTO_dbg_free(void *addr, int before_p) |
| 171 | { | 171 | { |
| 172 | fprintf(stderr, "this is a bad idea"); | 172 | /* CRYPTO_dbg_free is no longer permitted */ |
| 173 | abort(); | 173 | abort(); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| @@ -177,7 +177,7 @@ void | |||
| 177 | CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, | 177 | CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, |
| 178 | const char *file, int line, int before_p) | 178 | const char *file, int line, int before_p) |
| 179 | { | 179 | { |
| 180 | fprintf(stderr, "this is a bad idea"); | 180 | /* CRYPTO_dbg_realloc is no longer permitted */ |
| 181 | abort(); | 181 | abort(); |
| 182 | } | 182 | } |
| 183 | 183 | ||
