Skip to content

Commit

Permalink
fixed segmentation error
Browse files Browse the repository at this point in the history
fixed segmentation error on the ip2location_open_mem
  • Loading branch information
chrislim2888 committed Nov 18, 2014
1 parent 4ca2fed commit 9db34f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ip2location.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ PHP_FUNCTION(ip2location_open)
PHP_FUNCTION(ip2location_open_mem)
{
int method;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &method) == FAILURE) {
int arg_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &method, &arg_len) == FAILURE) {
return;
}
/*Shared memory method is not supported*/
Expand Down

0 comments on commit 9db34f3

Please sign in to comment.