Fixed a bug in `upb_Map_Delete()` that caused crashes in map.delete(k) for Ruby when string-keyed maps were in use.
Fixes: https://github.com/protocolbuffers/protobuf/issues/12580 When `upb_Map_Delete(map, k, &v)` was called for a string-keyed map, the returned value `v` contained garbage data instead of the true string length. Since `map.delete(k)` in Ruby returns the deleted value, this was causing a garbage length to be used when allocating and copying data. PiperOrigin-RevId: 535261609pull/13171/head
parent
73ee41cbb2
commit
14bad4a5bf
2 changed files with 22 additions and 3 deletions
Loading…
Reference in new issue