chobie / php-protocolbuffers

PECL ProtocolBuffers
pecl.php.net/package/protocolbuffers
Other
128 stars 38 forks source link

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

Open brtriver opened 10 years ago

brtriver commented 10 years ago

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?