summaryrefslogtreecommitdiff
path: root/ext/sdbm
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-14 15:41:40 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-14 15:41:40 +0000
commit0f36ecebe0d0e89dd96d66dba96119824ae055a0 (patch)
treeb4be2daabe661ccbee038408fe0a4a4be85e9699 /ext/sdbm
parent8f1c92af4f90b4817eebcaa7c1e75747a90cfb50 (diff)
* string.c (rb_str_clear): avoid revealing NULL pointer.
[ruby-dev:24766] * string.c (str_gsub): add paranoid check. [ruby-dev:24827] * string.c (str_mod_check): check frozen status as well. [ruby-dev:24801] * lib/mathn.rb (Integer::gcd2): faster implementation by <erlercw@siu.edu>. [ruby-talk:120232] * ext/gdbm/gdbm.c (fgdbm_store): StringValue() may alter string pointer. [ruby-dev:24783] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/sdbm')
-rw-r--r--ext/sdbm/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index eec9e71..104faa0 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -445,11 +445,11 @@ fsdbm_store(obj, keystr, valstr)
fdbm_modify(obj);
StringValue(keystr);
+ StringValue(valstr);
key.dptr = RSTRING(keystr)->ptr;
key.dsize = RSTRING(keystr)->len;
- StringValue(valstr);
val.dptr = RSTRING(valstr)->ptr;
val.dsize = RSTRING(valstr)->len;