summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--pack.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f768b2..d64a3d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Mar 29 17:54:46 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * pack.c (pack_pack): do not call rb_str_buf_cat() with NULL ptr,
+ which causes SEGV; jump to grow instead. [ruby-dev:19944]
+
Sat Mar 29 15:19:48 2003 Tanaka Akira <akr@m17n.org>
* instruby.rb, ext/extmk.rb, lib/benchmark.rb, lib/cgi.rb,
diff --git a/pack.c b/pack.c
index be89a09..000c6e5 100644
--- a/pack.c
+++ b/pack.c
@@ -489,7 +489,8 @@ pack_pack(ary, fmt)
c = byte & 0xff;
rb_str_buf_cat(res, &c, 1);
}
- rb_str_buf_cat(res, 0, j);
+ len = j;
+ goto grow;
}
break;
@@ -518,7 +519,8 @@ pack_pack(ary, fmt)
c = byte & 0xff;
rb_str_buf_cat(res, &c, 1);
}
- rb_str_buf_cat(res, 0, j);
+ len = j;
+ goto grow;
}
break;
@@ -548,7 +550,8 @@ pack_pack(ary, fmt)
char c = byte & 0xff;
rb_str_buf_cat(res, &c, 1);
}
- rb_str_buf_cat(res, 0, j);
+ len = 1;
+ goto grow;
}
break;
@@ -578,7 +581,8 @@ pack_pack(ary, fmt)
char c = byte & 0xff;
rb_str_buf_cat(res, &c, 1);
}
- rb_str_buf_cat(res, 0, j);
+ len = j;
+ goto grow;
}
break;
}