On Sun, Nov 18, 2012 at 9:21 AM, Markus Koschany wrote: > thanks for taking the time to review the changes. Indeed the author of > etw already checks for PATH_MAX in etw.c and stores the result in > TEMP_DIR. On the other hand he uses 1024 bytes for the buffer at most > and truncates the rest if it exceeds this limit. You can find the > relevant part at line 800 and the following lines in menu.c. > > Thanks for pointing this out. I've changed the code accordingly. > > +--- a/etw/menu_config.c > ++++ b/etw/menu_config.c > +@@ -392,9 +392,16 @@ void load_config(FILE *f) > + void read_menu_config(void) > + { > + FILE *f; > ++ char path[1024]; > ++ snprintf(path, 1024, "%setw.cfg", TEMP_DIR); > ++ > + D(bug("Reading configuration...\n"/*-*/)); > + > +- f=fopen("etw.cfg"/*-*/,"r"); > ++ f=fopen(path/*-*/,"r"); > ++ > ++ if (f == NULL) { > ++ f=fopen("etw.cfg"/*-*/,"r"); > ++ }
snprintf is a much better choice. Thanks! I tried to build, but got an error: undefined reference to 'atan2'. I think your linker flags are missing '-lm'? Best wishes, Mike -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CANTw=MNyAWVndrdhPSSUDeh7Q1nmF4k+n8FFobC-o==f=cW=0...@mail.gmail.com