fix underflow

This commit is contained in:
Luke Jahnke authored and Nobuyoshi Nakada committed 2025-12-29 17:21:33 +09:00
1 parent 38701a4de8
commit 4e0bb58a0a
1 file changed
+1 -1
Notes: git 2025-12-29 08:22:01 +00:00
+1 -1
View File
@@ -302,7 +302,7 @@ pack_pack(rb_execution_context_t *ec, VALUE ary, VALUE fmt, VALUE buffer)
else if (ISDIGIT(*p)) {
errno = 0;
len = STRTOUL(p, (char**)&p, 10);
if (errno) {
if (len < 0 || errno) {
rb_raise(rb_eRangeError, "pack length too big");
}
}