diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2026-01-12 17:02:01 -0800 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2026-01-12 17:02:01 -0800 |
| commit | b170f02e0f2a7831b51a9279ee2d35a5e4ecace9 (patch) | |
| tree | dc8289ce036c492f1525ccfc43d186754ba0549d | |
| parent | cc4ce48f1277125df6c981a21efa4256c350a8ae (diff) | |
merge revision(s) 4e0bb58a0a374b40b7691e7b7aa88e759a0fc9f2: [Backport #21811]
[PATCH] fix underflow
| -rw-r--r-- | pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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"); } } |
