X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Frrd_restore.c;h=29a97b3bf67260a946bd9ac9e950b11ebf9cd458;hb=5b9934cea6164cb4c1bb15a4400af2f861a4a834;hp=51def7e465e2c16736c66310ae271c4f78d7aa63;hpb=a9e69acbc184063dcc0eda6a250ee1b7ae1cbb47;p=rrdtool.git diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 51def7e..29a97b3 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -191,8 +191,9 @@ int xml2rrd(char* buf, rrd_t* rrd, char rc){ read_tag(&ptr2,"max","%lf",&(rrd->ds_def[rrd->stat_head->ds_cnt-1].par[DS_max_val].u_val)); } else { /* DST_CDEF */ char buffer[1024]; - read_tag(&ptr2,"cdef","%s",buffer); + read_tag(&ptr2,"cdef","%1000s",buffer); parseCDEF_DS(buffer,rrd,rrd -> stat_head -> ds_cnt - 1); + if (rrd_test_error()) return -1; } read_tag(&ptr2,"last_ds","%30s",rrd->pdp_prep[rrd->stat_head->ds_cnt-1].last_ds);