php-protocolbuffers icon indicating copy to clipboard operation
php-protocolbuffers copied to clipboard

segmentation fault if passed invalid data, when ProtocolBuffers::decode is called

Open brtriver opened this issue 11 years ago • 0 comments

if empty data is passed ...

ProtocolBuffers::decode('Test\Sample', '');

PHP Fatal error:  Uncaught exception 'ProtocolBuffersInvalidProtocolBufferException' with message 'passed variable seems null' in ...

but like this with invalid data ...

ProtocolBuffers::decode('Test\Sample', 1);

[1]    10767 segmentation fault

Is it not supported to throw exception when invalid data is passed now?

  • PHP 5.4.31
  • php-protocolbuffers https://github.com/chobie/php-protocolbuffers/commit/747a2238f14de0be67d5747089b50ebcc5e1116c

brtriver avatar Oct 22 '14 03:10 brtriver