-
Hello,
The attached matrix created through the code [1] creates a mat file which cannot be read by matio.
Here is the stack:
#0 ReadNextCell (mat=0x8068ef8, matvar=0x806b9d8) at mat5.c:1358
#1 0xb143da96 in Mat_VarReadNextInfo5 (mat=0x8068ef8) at mat5.c:6969
#2 0xb1440330 in Mat_VarReadNextInfo (mat=0xbfffec5c) at mat.c:1703
#3 0xb1440395 in Mat_VarReadNext (mat=0x8068ef8) at...
2009-11-17 13:50:38 UTC by grayswandir
-
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
2009-10-25 02:20:24 UTC by sf-robot
-
Can you give an example code that crashes? fread should not crash if you try to read too much data. See an example below. Note that the return value of fread is the actual number of objects read.
chulbert@maclap ~$ cat junk.c
#include
#include
int main(void)
{
FILE *fp;
size_t n1,n2;
unsigned char buf[100];
fp = fopen("junk","rb");
n1 =...
2009-10-10 22:25:52 UTC by chulbe2lsu
-
chulbe2lsu changed the public information on the MAT File I/O Library project.
2009-10-10 21:58:27 UTC by chulbe2lsu
-
In inflate.c, line 661 it seems
z->avail_in = fread(comp_buf,1,nBytes,mat->fp);
should instead be:
z->avail_in = fread(comp_buf,1,nBytes-bytesread,mat->fp);
read5 was crashing for me until I made that change to the file.
- Scovil.
2009-09-29 21:19:43 UTC by nobody
-
NB : at the moment, I'm a happy user of matio and I get the functionality I want (which may be too specific/hacky to be included in the lib) in a wrapping library.
2009-08-13 15:34:32 UTC by zougloub
-
Hi,
For a lot of reasons, writing to .mat files is a little less dumb than writing to CSV files...
However, I did not find (maybe I didn't look too well) a way to append a row of data in an array in the API docs.
Is there such a way ?
Regards,
2009-08-12 22:05:11 UTC by zougloub
-
In function Mat_Mat_VarReadDataLinear() a typo causes corrupt data read:
Change line mat.c:1416 from:
InflateDataType(mat,matvar,tag);
To:
InflateDataType(mat,matvar->z,tag);
Note the "->z".
2009-07-04 04:39:50 UTC by nobody