Skip to content

Commit

Permalink
snapshot's mountpoint did not allocate room for terminating null byte,
Browse files Browse the repository at this point in the history
causing amusing mayhem. Hopefully addresses issue #123
  • Loading branch information
lundman committed Apr 3, 2014
1 parent d425f8f commit db6c509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libzfs/libzfs_dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -2254,7 +2254,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
size_t len = secondhalf - relpath;
if (len > 0) {
char *firsthalf =
(char *)malloc(len);
(char *)malloc(len+1);
memcpy(firsthalf, relpath, len);
firsthalf[len] = '\0';
(void) snprintf(propbuf,
Expand Down

0 comments on commit db6c509

Please sign in to comment.