char *lastkey;
char *basedir;
size_t basedir_len;
- int dirdepth;
+ size_t dirdepth;
size_t st_size;
} ps_files;
data->fd = -1;
if ((p = strchr(save_path, ';'))) {
- data->dirdepth = strtol(save_path, NULL, 10);
+ data->dirdepth = (size_t) strtol(save_path, NULL, 10);
save_path = p + 1;
}
data->basedir_len = strlen(save_path);
PS_SERIALIZER_ENCODE_FUNC(php_binary)
{
zval *buf;
- char strbuf[MAX_STR + 1];
+ unsigned char strbuf[MAX_STR + 1];
php_serialize_data_t var_hash;
PS_ENCODE_VARS;
PS_ENCODE_LOOP(
if (key_length > PS_BIN_MAX) continue;
- strbuf[0] = key_length;
+ strbuf[0] = (unsigned char) key_length;
memcpy(strbuf + 1, key, key_length);
STR_CAT(buf, strbuf, key_length + 1);
php_var_serialize(buf, struc, &var_hash);
} else {
if (key_length > PS_BIN_MAX) continue;
- strbuf[0] = key_length & PS_BIN_UNDEF;
+ strbuf[0] = (unsigned char) key_length & PS_BIN_UNDEF;
memcpy(strbuf + 1, key, key_length);
STR_CAT(buf, strbuf, key_length + 1);