Project

General

Profile

Bug #857 » babeltrace-ctf.diff

Patch for the bug. - craig harmer, 11/10/2014 09:52 PM

View differences:

formats/ctf/ctf.c
len = fread(&index_hdr, sizeof(index_hdr), 1, pos->index_fp);
if (len != 1) {
perror("read index file header");
char msgbuf[256];
strerror_r(errno, msgbuf, sizeof(msgbuf) );
if (len == 0) {
strncpy(msgbuf, "Index file is too short", sizeof(msgbuf) );
}
fprintf(stderr, "[error] An index file under %s: %s\n",
td->parent.path, msgbuf);
ret = -1;
goto error;
}
(1-1/2)