mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 05:54:47 +02:00
Give each paste buffer a size member instead of requiring them to be
zero-terminated.
This commit is contained in:
@ -75,7 +75,7 @@ cmd_save_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (fwrite(pb->data, 1, strlen(pb->data), f) != strlen(pb->data)) {
|
||||
if (fwrite(pb->data, 1, pb->size, f) != pb->size) {
|
||||
ctx->error(ctx, "%s: fwrite error", data->arg);
|
||||
fclose(f);
|
||||
return (-1);
|
||||
|
Reference in New Issue
Block a user