text_file: allocate line buffers dynamically
Use a single GString buffer object in all functions loading the database. Enlarge it automatically for long lines. This eliminates the maximum line length for tag values. There is still an upper limit of 512 kB to prevent denial of service, but that's reasonable I guess.
This commit is contained in:
@@ -31,6 +31,7 @@ int
|
||||
directory_save(FILE *fp, struct directory *directory);
|
||||
|
||||
bool
|
||||
directory_load(FILE *fp, struct directory *directory, GError **error);
|
||||
directory_load(FILE *fp, struct directory *directory,
|
||||
GString *buffer, GError **error);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user