Skip to content

Commit

Permalink
formats/csv: fix potential crash
Browse files Browse the repository at this point in the history
  • Loading branch information
sahib committed Nov 16, 2019
1 parent 4938501 commit 1b06eb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/formats/csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ static void rm_fmt_elem(_UNUSED RmSession *session, _UNUSED RmFmtHandler *parent
checksum_str = g_slice_alloc0(checksum_size);
checksum_str[checksum_size - 1] = 0;
rm_digest_hexstring(file->digest, checksum_str);
} else {
checksum_str = g_slice_alloc0(1);
*checksum_str = 0;
}

/* Escape quotes in the path (refer http://tools.ietf.org/html/rfc4180, item 6)*/
Expand Down

0 comments on commit 1b06eb3

Please sign in to comment.