Skip to content
This repository was archived by the owner on Nov 11, 2021. It is now read-only.

Commit a44b643

Browse files
committed
fix ZTS
1 parent f4ef030 commit a44b643

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

blenc.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ PHP_FUNCTION(blenc_encrypt) {
238238

239239
memset(main_hash, '\0', sizeof(main_hash));
240240

241-
php_blenc_make_md5(main_hash, main_key, strlen(main_key));
241+
php_blenc_make_md5(main_hash, main_key, strlen(main_key) TSRMLS_CC);
242242

243243
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|s", &data, &data_len,
244244
&output_file, &output_file_len,
@@ -252,7 +252,7 @@ PHP_FUNCTION(blenc_encrypt) {
252252
dup_key = TRUE;
253253
}
254254

255-
php_blenc_make_md5((char *)&header.md5, data, data_len);
255+
php_blenc_make_md5((char *)&header.md5, data, data_len TSRMLS_CC);
256256

257257
retval = php_blenc_encode(data, key, data_len, &output_len TSRMLS_CC);
258258

@@ -323,7 +323,7 @@ static int php_blenc_load_keyhash(TSRMLS_D)
323323
keys = php_blenc_file_to_mem(BL_G(key_file) TSRMLS_CC);
324324

325325
memset(main_hash, '\0', sizeof(main_hash));
326-
php_blenc_make_md5(main_hash, main_key, strlen(main_key));
326+
php_blenc_make_md5(main_hash, main_key, strlen(main_key) TSRMLS_CC);
327327

328328
if(keys) {
329329
char *t = keys;
@@ -337,7 +337,7 @@ static int php_blenc_load_keyhash(TSRMLS_D)
337337
}
338338

339339
bfdata = php_base64_decode(key, strlen(key), &bfdata_len);
340-
buff = php_blenc_decode(bfdata, main_hash, bfdata_len, &buff_len);
340+
buff = php_blenc_decode(bfdata, main_hash, bfdata_len, &buff_len TSRMLS_CC);
341341

342342
temp = pestrdup(buff, TRUE);
343343
if(zend_hash_next_index_insert(php_bl_keys, &temp, sizeof(char *), NULL) == FAILURE) {
@@ -591,10 +591,10 @@ zend_op_array *blenc_compile(zend_file_handle *file_handle, int type TSRMLS_DC)
591591
zend_hash_get_current_data(php_bl_keys, (void **)&key) == SUCCESS;
592592
zend_hash_move_forward(php_bl_keys)) {
593593

594-
decoded = php_blenc_decode(encoded, *key, script_len - sizeof(blenc_header), &decoded_len);
594+
decoded = php_blenc_decode(encoded, *key, script_len - sizeof(blenc_header), &decoded_len TSRMLS_CC);
595595

596596
md5 = emalloc(33);
597-
php_blenc_make_md5(md5, decoded, decoded_len);
597+
php_blenc_make_md5(md5, decoded, decoded_len TSRMLS_CC);
598598

599599
if(!strncmp(md5, header->md5, 32)) {
600600

0 commit comments

Comments
 (0)