I am building a program that reads an XML configuration file. The XML configuration file contains several variables. One of which is
<bin_file>/some/file/path/file.bin</bin_file>
In my code I have the following struct
struct buildConofig {
char foo[3];
char bar[2];
char bin_file[?];
};
The code looks at the XML file and fills in the struct as it finds the matching elements in XML. I'm not sure what the length of the bin_file field should be. Is there a limit to file path size?
Or should I make bin_file a pointer and then malloc enough bytes after I check the XML field?
Thanks for your help.