Need to check length before packing a symbol; fix #4340

This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-03-25 20:28:21 +09:00
parent f7e05c7d22
commit 33a9840e4a
+1
View File
@@ -53,6 +53,7 @@ sym_inline_pack(const char *name, uint16_t len)
if (p == 0) return 0; /* non alnum char */
bits = (uint32_t)(p - pack_table)+1;
if (bits > 27) lower = 0;
if (i >= mix_length_max) break;
sym |= bits<<(i*6+2);
}
if (lower) {