Closed odemengeon closed 7 months ago
oh interesting one, that might be because you are working in /tmp, will check that out.
Looking into this now. Cannot reproduce the error at all. However I guess I identified the line (88) you refer to @odemengeon :
sprintf(out_path, "%s/%s", out_path, pdb_code);
adressed & merged in different PR -> already on current master
Describe the bug fpocket try store files in / where ever is the input file
To Reproduce
Expected behavior No crash and output file stored where the pdb file is stored
Desktop (please complete the following information):
Source of problem: in src/fpout.c, the function write_out_fpocket use 2 times sprintf with destination and source using same memory buffer (out_path) and as the manual explain: C99 and POSIX.1-2001 specify that the results are undefined if a call to sprintf(), snprintf(), vsprintf(), or vsnprintf() would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer). Using a temporary buffer, seems fix the issue at least in fpocket called only with -f