summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-17 09:40:17 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-17 09:40:17 +0000
commitd1b530da2ae6862bb0b7ef4955d0ac5077a29cac (patch)
treed6f1b8cd6d6f35872bf3f666c69bae0f0930607e /ext
parent24bc5220edfd111e8f9c791e74a8cfeb254aa808 (diff)
downloadruby-d1b530da2ae6862bb0b7ef4955d0ac5077a29cac.tar.gz
ruby-d1b530da2ae6862bb0b7ef4955d0ac5077a29cac.tar.xz
ruby-d1b530da2ae6862bb0b7ef4955d0ac5077a29cac.zip
should check retuen value of rb_protect.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index f4a3fc4c9..9f605f016 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -133,7 +133,7 @@ ossl_buf2str(char *buf, int len)
int status = 0;
str = rb_protect((VALUE(*)_(()))ossl_str_new, len, &status);
- memcpy(RSTRING(str)->ptr, buf, len);
+ if(!NIL_P(str)) memcpy(RSTRING(str)->ptr, buf, len);
OPENSSL_free(buf);
if(status) rb_jump_tag(status);