apache/dubbo-go-hessian2

Decode 阶段,'B' (byte) 标会被解析为 int32

LaurenceLiZhixin opened this issue · 2 comments

这一行负责解析为int32

case (0x80 <= tag && tag <= 0xbf) || (0xc0 <= tag && tag <= 0xcf) ||

位置位于解析byte之前:
case (tag == BC_BINARY) || (tag == BC_BINARY_CHUNK) || (tag >= 0x20 && tag <= 0x2f) ||

而'B' byte 标会优先进入int32的处理分支,被解析为int32,因为'B' == 0x91 ,符合int32的第一个条件。

@LaurenceLiZhixin can u provide a demo for this issue?