mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-03 12:12:06 +00:00
Fix more base64 warnings
This commit is contained in:
parent
b93d08ebb7
commit
4ad5a7a27b
@ -297,7 +297,7 @@ int main(int argc, char **argv) {
|
||||
case 1: // encode
|
||||
{
|
||||
int binlen = strlen (hashstr);
|
||||
ut8 *out = malloc (((binlen+1)*4)/3);
|
||||
char *out = malloc (((binlen+1)*4)/3);
|
||||
if (out) {
|
||||
r_base64_encode (out, (const ut8*)hashstr, binlen);
|
||||
printf ("%s\n", out);
|
||||
@ -310,7 +310,7 @@ int main(int argc, char **argv) {
|
||||
{
|
||||
ut8 *out = malloc (INSIZE);
|
||||
if (out) {
|
||||
int outlen = r_base64_decode (out, hashstr, strlen (hashstr));
|
||||
int outlen = r_base64_decode (out, (const char *)hashstr, strlen (hashstr));
|
||||
write (1, out, outlen);
|
||||
free (out);
|
||||
}
|
||||
@ -368,7 +368,8 @@ int main(int argc, char **argv) {
|
||||
case 1: // encode
|
||||
{
|
||||
int binlen;
|
||||
ut8 *out, *bin = (ut8*)r_file_slurp (argv[i], &binlen);
|
||||
char *out;
|
||||
ut8 *bin = (ut8*)r_file_slurp (argv[i], &binlen);
|
||||
if (!bin) {
|
||||
eprintf ("Cannot open file\n");
|
||||
continue;
|
||||
|
@ -266,7 +266,7 @@ static int rax (char *str, int len, int last) {
|
||||
return R_TRUE;
|
||||
} else if (flags & 4096) { // -E
|
||||
const int len = strlen (str);
|
||||
ut8* out = calloc (sizeof(ut8), ((len+1)*4)/3);
|
||||
char * out = calloc (sizeof(ut8), ((len+1)*4)/3);
|
||||
if (out) {
|
||||
r_base64_encode (out, (const ut8*)str, len);
|
||||
printf ("%s\n", out);
|
||||
|
Loading…
x
Reference in New Issue
Block a user