mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (str_gsub): should have removed rb_str_unlocktmp(str).
[ruby-dev:24708] * ext/socket/socket.c (s_recvfrom): buffer modification check. [ruby-dev:24708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
47548dd33e
commit
28d67a0bfe
4 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
Fri Nov 5 08:34:43 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* string.c (str_gsub): should have removed rb_str_unlocktmp(str).
|
||||
[ruby-dev:24708]
|
||||
|
||||
* ext/socket/socket.c (s_recvfrom): buffer modification check.
|
||||
[ruby-dev:24708]
|
||||
|
||||
Thu Nov 4 23:54:21 2004 Kazuo Saito <ksaito@uranus.dti.ne.jp>
|
||||
|
||||
* regexec.c, regparse.c, regint.h: fixed conflicts between
|
||||
|
|
|
@ -476,6 +476,9 @@ s_recvfrom(sock, argc, argv, from)
|
|||
retry:
|
||||
rb_str_locktmp(str);
|
||||
rb_thread_wait_fd(fd);
|
||||
if (buflen != RSTRING(str)->len) {
|
||||
rb_raise(rb_eRuntimeError, "buffer modified");
|
||||
}
|
||||
TRAP_BEG;
|
||||
slen = recvfrom(fd, RSTRING(str)->ptr, buflen, flags, (struct sockaddr*)buf, &alen);
|
||||
TRAP_END;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# rewritten by Akinori MUSHA <knu@ruby-lang.org>
|
||||
#
|
||||
|
||||
warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: getopts is deprecated after Ruby 1.8.1; use optparse instead"
|
||||
warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: getopts is deprecated after Ruby 1.8.1; use optparse instead" if caller[0]
|
||||
|
||||
$RCS_ID=%q$Header$
|
||||
|
||||
|
|
1
string.c
1
string.c
|
@ -2134,7 +2134,6 @@ str_gsub(argc, argv, str, bang)
|
|||
}
|
||||
rb_backref_set(match);
|
||||
*bp = '\0';
|
||||
rb_str_unlocktmp(str);
|
||||
rb_str_unlocktmp(dest);
|
||||
if (bang) {
|
||||
if (str_independent(str)) {
|
||||
|
|
Loading…
Reference in a new issue