Fixing coverity issues and a potential buffer overflow in bb->op_bytes