php_error_docref(NULL TSRMLS_CC, E_ERROR, "Dump memory failed");
}
- sprintf(cont_len, "Content-Length: %d", size);
+ snprintf(cont_len, sizeof(cont_len), "Content-Length: %d", size);
sapi_add_header(cont_len, strlen(cont_len), 1);
if (soap_version == SOAP_1_2) {
sapi_add_header("Content-Type: application/soap+xml; charset=utf-8", sizeof("Content-Type: application/soap+xml; charset=utf-8")-1, 1);
our fault code with their own handling... Figure this out later
*/
sapi_add_header("HTTP/1.1 500 Internal Service Error", sizeof("HTTP/1.1 500 Internal Service Error")-1, 1);
- sprintf(cont_len,"Content-Length: %d", size);
+ snprintf(cont_len, sizeof(cont_len), "Content-Length: %d", size);
sapi_add_header(cont_len, strlen(cont_len), 1);
if (soap_version == SOAP_1_2) {
sapi_add_header("Content-Type: application/soap+xml; charset=utf-8", sizeof("Content-Type: application/soap+xml; charset=utf-8")-1, 1);
} else {
if (name == NULL) {
paramName = paramNameBuf;
- sprintf(paramName,"param%d",index);
+ snprintf(paramName, sizeof(paramNameBuf), "param%d",index);
} else {
paramName = name;
}
cp = (UChar)(i + entity_map[j].basechar);
key_len = zend_codepoint_to_uchar(cp, key);
key[key_len] = 0;
- sprintf(buffer, "&%s;", entity_map[j].table[i]);
+ snprintf(buffer, sizeof(buffer), "&%s;", entity_map[j].table[i]);
add_u_assoc_ascii_string_ex(return_value, IS_UNICODE, ZSTR(key), key_len+1, buffer, 1);
} else {
/* no wide chars here, because charset is always cs_8859_1 */
ind[0] = i + entity_map[j].basechar;
- sprintf(buffer, "&%s;", entity_map[j].table[i]);
+ snprintf(buffer, sizeof(buffer), "&%s;", entity_map[j].table[i]);
add_assoc_string(return_value, ind, buffer, 1);
}
}
PHP_SET_CLASS_ATTRIBUTES(obj);
php_wddx_add_chunk_static(packet, WDDX_STRUCT_S);
- sprintf(tmp_buf, WDDX_VAR_S, PHP_CLASS_NAME_VAR);
+ snprintf(tmp_buf, WDDX_BUF_LEN, WDDX_VAR_S, PHP_CLASS_NAME_VAR);
php_wddx_add_chunk(packet, tmp_buf);
php_wddx_add_chunk_static(packet, WDDX_STRING_S);
php_wddx_add_chunk_ex(packet, class_name.s, name_len);
PHP_SET_CLASS_ATTRIBUTES(obj);
php_wddx_add_chunk_static(packet, WDDX_STRUCT_S);
- sprintf(tmp_buf, WDDX_VAR_S, PHP_CLASS_NAME_VAR);
+ snprintf(tmp_buf, WDDX_BUF_LEN, WDDX_VAR_S, PHP_CLASS_NAME_VAR);
php_wddx_add_chunk(packet, tmp_buf);
php_wddx_add_chunk_static(packet, WDDX_STRING_S);
php_wddx_add_chunk_ex(packet, class_name.s, name_len);