Skip to content

Commit

Permalink
Fix segfaults in parameter parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdm committed Oct 10, 2013
1 parent b478d3d commit 6d4e7ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mosquitto.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ PHP_METHOD(Mosquitto_Client, loop)
char *message = NULL;

PHP_MOSQUITTO_ERROR_HANDLING();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l!l!",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll",
&timeout, &max_packets) == FAILURE) {
PHP_MOSQUITTO_RESTORE_ERRORS();
return;
Expand All @@ -459,7 +459,7 @@ PHP_METHOD(Mosquitto_Client, loopForever)
char *message = NULL;

PHP_MOSQUITTO_ERROR_HANDLING();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l!l!",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll",
&timeout, &max_packets) == FAILURE) {
PHP_MOSQUITTO_RESTORE_ERRORS();
return;
Expand Down

0 comments on commit 6d4e7ff

Please sign in to comment.