php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76762 protobuf int32默认值导致js解析失败
Submitted: 2018-08-18 08:52 UTC Modified: 2021-08-26 11:04 UTC
From: 1339796113 at qq dot com Assigned: cmb (profile)
Status: Closed Package: PECL (PECL)
PHP Version: 7.2.9 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: 1339796113 at qq dot com
New email:
PHP Version: OS:

 

 [2018-08-18 08:52 UTC] 1339796113 at qq dot com
Description:
------------
int32 默认值0 map<int32, int64> 当map类型计算长度的时候由于int32 默认值为0  map的key为0时 导致计算长度不一样
 T(UPB_TYPE_FLOAT, float, float, 0.0)
    T(UPB_TYPE_DOUBLE, double, double, 0.0)
    T(UPB_TYPE_BOOL, bool, uint8_t, 0)
    T(UPB_TYPE_ENUM, int32, int32_t, 0)
    T(UPB_TYPE_INT32, int32, int32_t, -1)
    T(UPB_TYPE_UINT32, uint32, uint32_t, 0)
    T(UPB_TYPE_INT64, int64, int64_t, 0)
    T(UPB_TYPE_UINT64, uint64, uint64_t, 0)
encode_decode.c 1127行   T(UPB_TYPE_INT32, int32, int32_t, -1) 修改为这个即可


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-08-18 10:02 UTC] cmb@php.net
-Package: *Web Server problem +Package: PECL
 [2021-08-26 11:04 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-08-26 11:04 UTC] cmb@php.net
If this is still unresolved, please report it at
<https://github.com/protocolbuffers/protobuf/issues>.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC