summaryrefslogtreecommitdiff
path: root/set1/task1.c
diff options
context:
space:
mode:
Diffstat (limited to 'set1/task1.c')
-rw-r--r--set1/task1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/set1/task1.c b/set1/task1.c
index 945964a..7d2a87a 100644
--- a/set1/task1.c
+++ b/set1/task1.c
@@ -6,12 +6,11 @@ int main(int argc, char **argv)
if (argc != 2)
return 0;
-
char *result = malloc(strlen(argv[1]));
char *base64 = malloc(strlen(argv[1]));
decode_hex_string(argv[1], result);
- encode_to_base64(result, base64);
+ encode_to_base64(result, strlen(argv[1])/2, base64);
printf("%s\n", base64);