summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-02-18 12:27:47 +0000
committerBenny Prijono <bennylp@teluu.com>2008-02-18 12:27:47 +0000
commit0b90209578eeb8932792b1abcd545f20487be96e (patch)
treea10752893b35fe5a548e0ad35b8383ed3196f0a3 /third_party
parent5d21b27abae20e228ec9cefa3c4c3d489a121362 (diff)
Fixed crash when running SRTP on Win32 app since stderr is undefined (thanks Truong Thanh Quang)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1804 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/srtp/crypto/rng/rand_source.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/third_party/srtp/crypto/rng/rand_source.c b/third_party/srtp/crypto/rng/rand_source.c
index 9bd7fc21..9867c295 100644
--- a/third_party/srtp/crypto/rng/rand_source.c
+++ b/third_party/srtp/crypto/rng/rand_source.c
@@ -97,8 +97,11 @@ rand_source_init(void) {
#elif (_MSC_VER >= 1400)
dev_random_fdes = RAND_SOURCE_READY;
#else
- /* no random source available; let the user know */
- fprintf(stderr, "WARNING: no real random source present!\n");
+ /* no random source available; let the user know */
+ if (stderr)
+ fprintf(stderr, "WARNING: no real random source present!\n");
+ else
+ printf("WARNING: no real random source present!\n");
dev_random_fdes = RAND_SOURCE_READY;
#endif
return err_status_ok;