[rrd-users] ERROR: attempting to write beyond end of file

Tobias Oetiker tobi at oetiker.ch
Wed Jan 19 09:12:19 CET 2011


Hi Stefan,

Today Stefan Brandl wrote:

>
> Sorry Tobi, but my C-Programming knowledge is very limited,
> not to say non-existent :-(
> Could you tell me, where to put what code to further debug this?

I would guess something like this could serve:

Index: rrd_open.c
===================================================================
--- rrd_open.c  (revision 2172)
+++ rrd_open.c  (working copy)
@@ -671,7 +671,7 @@

     if((rrd_file->pos + count) > old_size)
     {
-        rrd_set_error("attempting to write beyond end of file");
+        rrd_set_error("attempting to write beyond end of file (%ld + %ld > %ld)",rrd_file->pos, count, old_size);
         return -1;
     }
     memcpy(rrd_simple_file->file_start + rrd_file->pos, buf, count);


cheers
tobi
>
>
> Thanks
>  Stefan
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-users mailing list