diff options
| author | TheVice <[email protected]> | 2020-01-27 16:29:16 +0200 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2020-01-27 16:17:09 -0500 |
| commit | 4730ab237ec7442cdf99e2d36c975c25a0ce78d9 (patch) | |
| tree | d1924c87455dcc0a80aaa3760b1415080c2f635b /c/main.c | |
| parent | dec0c4957689226919bcb09f426f2870c2b81f9e (diff) | |
[memset] placed function after checking of memory was done
on which it should be apply.
Diffstat (limited to 'c/main.c')
| -rw-r--r-- | c/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -143,11 +143,11 @@ int main(int argc, char **argv) { /* TODO: An incremental output reader API to avoid this allocation. */ uint8_t *out = malloc(out_len); - memset(out, 0, out_len); if (out_len > 0 && out == NULL) { fprintf(stderr, "malloc() failed.\n"); return 1; } + memset(out, 0, out_len); blake3_hasher_finalize(&hasher, out, out_len); for (size_t i = 0; i < out_len; i++) { printf("%02x", out[i]); |
