Skip to content

Commit 0773ab4

Browse files
committed
changes to dns.c
1 parent 6478088 commit 0773ab4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

ext/standard/dns.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ PHP_FUNCTION(gethostname)
153153
PHP_FUNCTION(gethostbyaddr)
154154
{
155155
char *addr;
156-
int addr_len;
156+
zend_str_size_int addr_len;
157157
char *hostname;
158158

159-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &addr, &addr_len) == FAILURE) {
159+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &addr, &addr_len) == FAILURE) {
160160
return;
161161
}
162162

@@ -215,10 +215,10 @@ static char *php_gethostbyaddr(char *ip)
215215
PHP_FUNCTION(gethostbyname)
216216
{
217217
char *hostname;
218-
int hostname_len;
218+
zend_str_size_int hostname_len;
219219
char *addr;
220220

221-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &hostname_len) == FAILURE) {
221+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &hostname, &hostname_len) == FAILURE) {
222222
return;
223223
}
224224

@@ -233,12 +233,12 @@ PHP_FUNCTION(gethostbyname)
233233
PHP_FUNCTION(gethostbynamel)
234234
{
235235
char *hostname;
236-
int hostname_len;
236+
zend_str_size_int hostname_len;
237237
struct hostent *hp;
238238
struct in_addr in;
239239
int i;
240240

241-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hostname, &hostname_len) == FAILURE) {
241+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &hostname, &hostname_len) == FAILURE) {
242242
return;
243243
}
244244

@@ -346,7 +346,7 @@ PHP_FUNCTION(dns_check_record)
346346
#endif
347347
u_char ans[MAXPACKET];
348348
char *hostname, *rectype = NULL;
349-
int hostname_len, rectype_len = 0;
349+
zend_str_size_int hostname_len, rectype_len = 0;
350350
int type = T_MX, i;
351351
#if defined(HAVE_DNS_SEARCH)
352352
struct sockaddr_storage from;
@@ -357,7 +357,7 @@ PHP_FUNCTION(dns_check_record)
357357
struct __res_state *handle = &state;
358358
#endif
359359

360-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &hostname, &hostname_len, &rectype, &rectype_len) == FAILURE) {
360+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|S", &hostname, &hostname_len, &rectype, &rectype_len) == FAILURE) {
361361
return;
362362
}
363363

@@ -714,7 +714,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
714714
PHP_FUNCTION(dns_get_record)
715715
{
716716
char *hostname;
717-
int hostname_len;
717+
zend_str_size_int hostname_len;
718718
long type_param = PHP_DNS_ANY;
719719
zval *authns = NULL, *addtl = NULL;
720720
int type_to_fetch;
@@ -733,7 +733,7 @@ PHP_FUNCTION(dns_get_record)
733733
int type, first_query = 1, store_results = 1;
734734
zend_bool raw = 0;
735735

736-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz!z!b",
736+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|lz!z!b",
737737
&hostname, &hostname_len, &type_param, &authns, &addtl, &raw) == FAILURE) {
738738
return;
739739
}
@@ -926,7 +926,7 @@ PHP_FUNCTION(dns_get_record)
926926
PHP_FUNCTION(dns_get_mx)
927927
{
928928
char *hostname;
929-
int hostname_len;
929+
zend_str_size_int hostname_len;
930930
zval *mx_list, *weight_list = NULL;
931931
int count, qdc;
932932
u_short type, weight;
@@ -944,7 +944,7 @@ PHP_FUNCTION(dns_get_mx)
944944
struct __res_state *handle = &state;
945945
#endif
946946

947-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|z", &hostname, &hostname_len, &mx_list, &weight_list) == FAILURE) {
947+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sz|z", &hostname, &hostname_len, &mx_list, &weight_list) == FAILURE) {
948948
return;
949949
}
950950

0 commit comments

Comments
 (0)